Reputation: 3652
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!
Upvotes: 0
Views: 2764
Reputation: 5436
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.
Upvotes: 4