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.
Solution:
Run a cmd, enter the folder and type npm install . Type npm install node-inspector again.
Using Google Chrome DevTools to Debug To start debugging, let's run our application with the --inspect-brk flag. The next step is to head to Chrome, open a new tab, and enter the URL chrome://inspect/ . Click on “Open dedicated DevTools for Node” to start debugging the application.
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).
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