Narottam Goyal
Narottam Goyal

Reputation: 3652

How to get dev tools in electron app after packaging? ( electron app = angular2 + typescript)

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

Answers (1)

Jens Habegger
Jens Habegger

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

Related Questions