Merge pull request #3061 from flying-sheep/patch-1
fixed devtools instructions
This commit is contained in:
commit
c58ca76cac
1 changed files with 3 additions and 1 deletions
|
@ -16,11 +16,13 @@ $ cd /some-directory
|
||||||
$ git clone --recursive https://github.com/facebook/react-devtools.git
|
$ git clone --recursive https://github.com/facebook/react-devtools.git
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Follow the instructions in [`react-devtools/shells/chrome/Readme.md`](https://github.com/facebook/react-devtools/blob/master/shells/chrome/Readme.md) to build the extension.
|
||||||
|
|
||||||
Then you can load the extension in Electron by opening DevTools in any window,
|
Then you can load the extension in Electron by opening DevTools in any window,
|
||||||
and running the following code in the DevTools console:
|
and running the following code in the DevTools console:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
require('remote').require('browser-window').addDevToolsExtension('/some-directory/react-devtools');
|
require('remote').require('browser-window').addDevToolsExtension('/some-directory/react-devtools/shells/chrome');
|
||||||
```
|
```
|
||||||
|
|
||||||
To unload the extension, you can call the `BrowserWindow.removeDevToolsExtension`
|
To unload the extension, you can call the `BrowserWindow.removeDevToolsExtension`
|
||||||
|
|
Loading…
Reference in a new issue