Atom and Electron CLI switches


#1

I’m using Atom 1.6, which is using Electron 0.34.5. In the Electron docs it mentions the --debug and --debug-brk switches.

However running /Applications/Atom.app/Contents/MacOS/Atom --debug-brk=60131 hangs. Normally node processes print out that they’re waiting for a listener before proceeding. Using --debug allows Atom to run, but as I’m running a test (--dev --test) I’d like the process to block so I can connect my debugger (WebStorm).

Is there something I’m doing wrong?


Breakpoints at BrowserWindow Startup (--debug-brk)
#2

Atom has its own command-line option parser. It may not support all Electron options. I don’t believe that Atom has a documented method for debugging the main process. (Though I’ve heard that the debugger statement works pretty well.)


#3

Thanks @leedohm. I’ve raised https://github.com/atom/atom/issues/11256 as Atom shouldn’t take away from Electron’s capabilities.


#4

Is it possible to get some help to point me in the direction of the CLI option parser?


#5

To my understanding, the option parsing is here:

https://github.com/atom/atom/blob/master/src/browser/main.coffee#L99