Debugging

http://blog.strongloop.com/announcing-a-new-and-improved-node-js-debugger/
Debug your Node.js code
which points to https://github.com/adobe-research/theseus

 

 

node-inspector

https://github.com/node-inspector/node-inspector

 

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

https://github.com/mde/jake/issues/226

 

  1. node --debug-brk "\path\to\node_modules\jake\bin\cli.js" <rest of jake parameters>
  2. node-inspector &