How can I toggle devTool in electron app after packaging. I developed this app in angular2. So, I just want to have a button which will toggle devTool on demand.
Thank you!
How can I toggle devTool in electron app after packaging. I developed this app in angular2. So, I just want to have a button which will toggle devTool on demand.
Thank you!
Based on the Electron API documentation, this should do the trick:
let win = new BrowserWindow()
win.webContents.openDevTools()
If you want to connect the openDevTools function to a button click or keyboard shortcut, you'll have to wire it to your renderer process via IPC.