I am using electron-react-boilerplate to create an Electron-React app. The dev tools show up on the screen by default. How can I make the dev tools only appear when I ask for them and not show up on launch?
Also, there are no errors shown in the console, so the dev tools are not showing up because there's an error.
Disable developer tools in productionThe key-combination CTRL + SHIFT + I (or ALT + CMD + I on Mac) will open the dev tools and enable inspection of the application. It will even enable some degree of modification.
Since the renderer process is the one being executed in our browser window, we can use the Chrome Devtools to debug it. To open DevTools, use the shortcut "Ctrl+Shift+I" or the <F12> key.
Just comment or remove this line of code in main.js file (setting devTools to false) this.mainWindow.openDevTools();
(or) Add the following code to
mainWindow = new BrowserWindow({ width: 1024, height: 768, webPreferences: { devTools: false } });
(or) change the package.json build to npm run build && build --win --x64
(or) again install npm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With