Skip to content
Advertisement

DevTools was disconnected from the page, electron

Guys i need to open some web application into my electron app, i used <webview> tag but [official docs][1] of electron offers to use BrowserView.
so i used BrowserView, BUT i got DevTools was disconnected from the page error!
simply i need DevTools for my BrowserView not my entire app. what should i do?

myCode: just main.js

JavaScript

Advertisement

Answer

openDevTools is basically a function of webContents (when used on BrowserWindow it’s only redirected)

So you can open devtools of main window with

JavaScript

And for the BrowserView with

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement