Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
116
rated 0 times [  120] [ 4]  / answers: 1 / hits: 7544  / 10 Years ago, fri, may 2, 2014, 12:00:00

This feels really silly, but I can't get node inspector / node-debug to work.



The instructions say to do npm install then to run node-debug web.js. So I did that. Now I have a lovely browser window open showing me my code with breakpoints... and no idea which url to use to actually access the code.



The inspector is at http://localhost:8080/debug?port=5858 and the terminal says:



> node-debug web.js
debugger listening on port 5858
Node Inspector is now available from http://localhost:8080/debug?port=5858
Debugging `web.js`


...



I've tried hitting up localhost:5000 (which is my express.js port) but that either fails if I don't have a separate node web.js instance running, or it succeeds if I have the other one running but doesn't trip any of the breakpoints in the inspector.



When I go to http://localhost:5858/, I get:




Remote debugging session already active




When I go to http://localhost:8080/, I get:




Cannot GET /




(the / path totally works on my server in general.)


More From » node.js

 Answers
13

By default node-debug starts app in --debug-brk mode.
This stops your app at first line (express not started).



You can use node-debug --no-debug-brk see the node-debug --h for more info.


[#45588] Thursday, May 1, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kayden

Total Points: 546
Total Questions: 102
Total Answers: 95

Location: Virgin Islands (U.S.)
Member since Fri, Mar 4, 2022
2 Years ago
;