How do you get node-inspector to work?

Install:

npm install node-inspector

Run app:

node --debug-brk c:\users\me\desktop\myapp.js // app stops successfully

Run inspector:

node-inspector // doesnt work.
C:\Users\me\node_modules\.bin\node-inspector // does work.

Open chrome or safari and make sure debugger is on and navigate to localhost:5858. But this releases the app from the breakpoint and it doesn't show up anywhere inside chrome or safari.

enter image description here

Solution:

enter image description here

Go directly to http://​localhost:8080.

Port 5858 is the port that node-inspector uses to communicate with your node process; you don't access it directly. It speaks V8's raw debugging protocol.

inspector talks to your process via that protocol and serves up a HTTP website on 8080.

Also, npm should have put C:\Users\me\node_modules\.bin\ in your PATH. You might need a reboot for that to take effect, after which you should be able to just type node-inspector at a command prompt (rather than typing the whole path).

You need to visit http://localhost:8080/debug?port=5850 instead of http://localhost:5858.

Visit http://localhost:8080/debug?port=5858 to open the node-inspector console.