How to open Dev tools for BrowserView

#1

Hi say I had the page github.com open. I want to view the source of github.com, how would I do this.

**remote.webContents.getFocusedWebContents().openDevTools(); **

if (remote.webContents.getFocusedWebContents().isDevToolsOpened()) {
** remote.webContents.getFocusedWebContents().devToolsWebContents.focus();**
}

I have tried this, worked as a charm until I built the app in electron-builder. Then if I pressed F12 to run that code, it would open the React dev tools instead.

Thanks, Ender