diff --git a/README.md b/README.md index 8968dd9..8b35d9d 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,12 @@ npm start The debugger tools are available when running in dev mode and can be activated with keyboard shortcuts as defined here https://github.com/sindresorhus/electron-debug#features. +It can also be displayed automatically from the `SHOW_DEV_TOOLS` environment variable such as: + +```bash +SHOW_DEV_TOOLS=true npm start +``` + #### Building the production distribution ```bash diff --git a/main.js b/main.js index 0e4f760..285c84f 100644 --- a/main.js +++ b/main.js @@ -22,6 +22,8 @@ const path = require('path'); const URL = require('url'); const config = require('./app/features/config'); +const showDevTools = Boolean(process.env.SHOW_DEV_TOOLS); + // We need this because of https://github.com/electron/electron/issues/18214 app.commandLine.appendSwitch('disable-site-isolation-trials'); @@ -51,7 +53,7 @@ contextMenu({ // show them automatically though. debug({ isEnabled: true, - showDevTools: false + showDevTools }); /**