问题
every time i run my electron app,it starts like this! always turn the front-end elements view,how can i start my app without this show on GUI? besides,why it goes with black bg? it went well on chrome. thank u,guys
回答1:
The black screen is probably due to the css files routes. Check them.
If you followed the starter electron tutorial, you are most likely calling mainWindow.openDevTools();
. Remove that line and you will not get the console.
回答2:
Check if your code is calling openDevTools().
回答3:
Just comment the below code
win.webContents.openDevTools()
to
// win.webContents.openDevTools()
回答4:
For me, the bug was with npm caching some sort of preference. Even when I got rid of "openDevTools()", the problem persisted. To fix the problem, I removed my node_modules folder, and re-ran "npm install", and from there everything worked just fine.
来源:https://stackoverflow.com/questions/36733761/how-can-i-turn-off-the-debug-view-in-electroni-cant-find-any-about-it-using-goo