[win.openDevTools()] List of options available


Can someone provide a list of the options available for openDevTools(). I found one option detach: true|false.

Are there more options available?

Also, there is no documentation for this function.


There is documentation for the function atom.openDevTools():

There are no options. All it does is opens the dev tools.


Very odd. It appears there is a gap in the docs. win.openDevTools({detach: true}), will trigger Dev Tools too open in a new window. There is another post discussing this detach option.


The documentation only covers the Atom API. Atom is built on top of Chromium and Node.js, which offer their own functionality (and their own documentation). The window global isn’t provided by the Atom API.


FYI, I am using <BrowserWindow>.openDevTools().


BrowserWindow.openDevTools() is defined in electron here

Redirecting to webcontent.OpenDevTool documented here

A look at the implementation confirm the single option


Excellent, makes sense now.

Seeing the BrowserWindow method is just a proxy to the real method in webContents, I wonder if we should consider deprecating the BrowserWindow method to prevent future confusion, or formally document the BrowserWindow method.

IMO, leaving this as is will likely result in more confused n00b’s.