From xradiograph

NodeJs: Debugging


It’s 2018, and you should be using --inspect and/or --inspect-brk.


I had to open up Chrome manually, manually go to chrome://inspect/#devices and select to inspect the running node instance. None of the URL protocols I found online worked.









On Windows (7), npm-install requires being run as Administrator. This is not an issue of node-inspector so much as a sub-package (ws?) of socket-io.


node-debug app.js seems to work for me, now.


attach to running node process on Windows

NOTE: as of 2013.09.19 this is not official, and there is some discussion about the wording.
As the discussion points out, process._debugProcess() is an undocumented (or internal?) API function and may be subject to change.


Windows does not support UNIX signals. To enable debugging, you can use an undocumented API function process._debugProcess(pid)


1. Get the PID of the node process using your favorite method, e.g.


tasklist /FI "IMAGENAME eq node.exe"


Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
node.exe                      3084 Console                    1     11,964 K


2. Call the API:


node -e "process._debugProcess(3084)"


Great! Now you are ready to attach the inspector.



Node-inspector for jakefiles


  1. node --debug-brk "\path\to\node_modules\jake\bin\cli.js" <rest of jake parameters>
  2. node-inspector &
Retrieved from
Page last modified on January 02, 2018, at 08:40 PM