I know how to debug http applications using node-inspector and iisnode. But can I use node-inspector to debug a non http node application, on windows?
I tried:
node debug test.js
It says:
debugger listening on port 5858
But opening http://localhost:5858/ in Chrome does not do anything.
BTW: running node debug test.js does start the command-line debugger which works. But it’s nothing like node-inspector.
To use node-inspector, the right switch is
node --debugnotnode debugHere are the detailed steps:
npm install -g node-inspector)node-inspectorhttp://localhost:8080/debug?port=5858. You’ll get the node-inspector UI but without any running app.--debugswitch like this:node --debug test.jsA few interesting points:
node --debug-brk test.js