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.
Atom Node Debugger is a simple debugging tool for both Node.
js Debugger. Node. js provides built-in non-graphic debugging tool that can be used on all platforms. It provides different commands for debugging Node.
A minimal CLI debugger is available with node inspect myscript. js . Several commercial and open source tools can also connect to the Node. js Inspector.
To use node-inspector, the right switch is node --debug
not node debug
Here are the detailed steps:
npm install -g node-inspector
)node-inspector
http://localhost:8080/debug?port=5858
. You'll get the node-inspector UI but without any running app.--debug
switch like this: node --debug test.js
A few interesting points:
node --debug-brk test.js
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With