How to get dev tools in built electron app?

て烟熏妆下的殇ゞ 提交于 2019-12-23 17:37:42

问题


Is it possible to show the dev tools within a built electron app? The executable that I built using electron-packager is behaving differently from the app run using electron at the command line, and I have no way to see what kinds of exceptions are being thrown.


回答1:


Yes it's possible to show the DevTools in a packaged app, just call someBrowserWindow.webContents.openDevTools(). If you want a menu item and/or keyboard shortcut to do it then you'll need to create and set your own menu for the browser window using someBrowserWindow.setMenu(someMenu).



来源:https://stackoverflow.com/questions/35518984/how-to-get-dev-tools-in-built-electron-app

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!