electron / devtron
- пятница, 13 мая 2016 г. в 03:13:17
JavaScript
An Electron DevTools Extension
An Electron DevTools extension to help you inspect, monitor, and debug your app.
npm install --save-dev devtron
Then execute the following from the Console tab of your running Electron app's developer tools:
require('devtron').install()
You should then see a Devtron
tab added.
git clone https://github.com/electron/devtron
cd devtron
npm install
npm start
This will start a process that watches and compiles the extension as files are modified.
Then open the Console tab of your Electron app and run the following with the path updated for the location that you've cloned devtron to:
require('/Users/me/code/devtron').install()
Then a Devtron tab should appear and it will now be enabled for that application.
You can reload the extension by closing and reopening the dev tools.
To make developing and debugging the extension easier, you can run it in a Chrome tab that will talk remotely to a running Electron app over HTTP.
DEVTRON_DEBUG_PATH
environment variable to the path of the cloned
devtron repository.You should then see the following messages logged to the Console tab:
Devtron server listening on http://localhost:3948
Open file:///Users/me/devtron/static/index.html to view
Then open /Users/me/devtron/static/index.html
in Chrome
Have an idea for something this extension could do to make debugging Electron apps easier? Please open an issue.
Pull requests are also welcome and appreciated. Run npm test
to run the
existing tests. This project uses the standard JavaScript style.