Skip to content

Commit

Permalink
docs: show the code of adding devtools extension (#16186)
Browse files Browse the repository at this point in the history
  • Loading branch information
moshfeu authored and Cheng Zhao committed Jan 15, 2019
1 parent 0881fd6 commit 05755ba
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/tutorial/devtools-extension.md
Expand Up @@ -29,7 +29,14 @@ Using the [React Developer Tools][react-devtools] as example:
* on macOS it is `~/Library/Application Support/Google/Chrome/Default/Extensions`.
1. Pass the location of the extension to `BrowserWindow.addDevToolsExtension`
API, for the React Developer Tools, it is something like:
`~/Library/Application Support/Google/Chrome/Default/Extensions/fmkadmapgofadopljbjfkapdkoienihi/0.15.0_0`
```javascript
const path = require('path')
const os = require('os')

BrowserWindow.addDevToolsExtension(
path.join(os.homedir(), '/Library/Application Support/Google/Chrome/Default/Extensions/fmkadmapgofadopljbjfkapdkoienihi/0.15.0_0')
)
```

**Note:** The `BrowserWindow.addDevToolsExtension` API cannot be called before the
ready event of the app module is emitted.
Expand Down

0 comments on commit 05755ba

Please sign in to comment.