Note
This project is under development and subject to change.
- Clone the repository to your local machine
- Run
npm install
to install dependencies - Run
npm link
to link the package globally - Run
npm run build
to build the project
- In your Electron app run
npm link @electron/devtron
to link the Devtron package - In your Electron app's
main.js
(or other relevant file) add the following code to load Devtron:
// main.js
const { devtron } = require('@electron/devtron')
const { monitorMain } = require('@electron/devtron/monitorMain')
monitorMain()
// function createWindow() {...}
app.whenReady().then(() => {
devtron.install()
// ...
})
- In your Electron app's
preload.js
(or other relevant file) add the following code to load Devtron:
// preload.js
const { monitorRenderer } = require('@electron/devtron/monitorRenderer')
monitorRenderer()
If Devtron is installed correctly, it should appear as a tab in the Developer Tools of your Electron app.