8000 GitHub - electron-userland/devtron at next
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

electron-userland/devtron

 
 

Repository files navigation

Devtron

Note

This project is under development and subject to change.

Building and Development

  • 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

Configuring an Electron App to use Devtron

  • 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. image

About

An Electron DevTools Extension

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 13

0