Debugging the browser process?


#1

Are there any tricks to debugging JavaScript running inside the Browser process? I tried setting up remote-debugging-port, but that only gives me a page that lets me get to various rendering processes. Is there a way to get the Inspector for the browser process?


#2

I managed to get this working on OS X, not sure if it will also work on Windows (but it should…)

Make sure there’s a debugger statement in the browser JS at the point you want to debug. Start Atom with the --debug option.

$ /Applications/Atom.app/Contents/MacOS/Atom --debug

Then you can debug with node:

$ node debug localhost:5858
connecting... ok
debug> repl
Press Ctrl + C to leave debug repl
> process.versions
{ http_parser: '2.3',
  node: '0.11.14',
  v8: '3.28.71.15',
  uv: '1.0.0',
  zlib: '1.2.3',
  modules: '16',
  openssl: '1.0.1i',
  'atom-shell': '0.19.1',
  chrome: '38.0.2125.101' }