Adds useful debug features to your Electron app
Ideas for more debug features welcome!
Toggle DevTools.
- macOS: Cmd Alt I or F12
- Linux: Ctrl Shift I or F12
- Windows: Ctrl Shift I or F12
Force reload the window.
- macOS: Cmd R or F5
- Linux: Ctrl R or F5
- Windows: Ctrl R or F5
Open DevTools and focus the Element Inspector tool.
- macOS: Cmd Shift C
- Linux: Ctrl Shift C
- Windows: Ctrl Shift C
Devtron is the official Electron DevTools extension.
Just install it in your app and we'll activate it for you.
$ npm install --save-dev devtron
$ npm install --save electron-debug
const {app, BrowserWindow} = require('electron');
require('electron-debug')({showDevTools: true});
let win;
app.on('ready', () => {
win = new BrowserWindow();
});Only runs when in development, unless overridden by the enabled option. So no need to guard it for production.
Install keyboard shortcuts and optionally activate DevTools on each created BrowserWindow.
Type: boolean
Type: boolean string
Default: false
Values: 'right' 'bottom' 'undocked' false true (last dock state)
Show DevTools on each created BrowserWindow.
Toggle DevTools for the specified BrowserWindow instance or the focused one.
Type: BrowserWindow
Default: the focused BrowserWindow
Reload the specified BrowserWindow instance or the focused one.
Type: BrowserWindow
Default: the focused BrowserWindow
Open DevTools for the specified BrowserWindow instance or the focused one.
Type: BrowserWindow
Default: the focused BrowserWindow
Type: boolean string
Default: false
Values: 'right' 'bottom' 'undocked' false true (last dock state)
Show DevTools on each created BrowserWindow.
- electron-config - Simple config handling for your Electron app or module
- electron-context-menu - Context menu for your Electron app
- electron-dl - Simplified file downloads for your Electron app
- electron-is-dev - Check if Electron is running in development
- debug-menu - Chrome-like debug context-menu for Electron
MIT © Sindre Sorhus