3

I use node.js and ExpressJS. I would like to debug my code.

node --debug

$ node --debug app.js
debugger listening on port 5858
connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0
connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0
Listening on port 3000
xStringLength": 10000}}Content-Length: 126
xStringLength": 10000}}Content-Length: 127
xStringLength": 10000}}Content-Length: 127
xStringLength": 10000}}Content-Length: 127
xStringLength": 10000}}Content-Length: 127

node-inspector

$ node-inspector
Node Inspector v0.7.2
Visit http://127.0.0.1:8080/debug?port=5858 to start debugging.

chrome

enter image description here

Detached from the target
Remote debugging has been terminated with reason: Debugged process exited.
Please re-attach to the new target.

I would like to

I would like to use break point like Xcode. but this error is repeating and the debug page is refresh automatically.

shingo.nakanishi
  • 2,045
  • 2
  • 21
  • 55

4 Answers4

1

Please try to install an older version of Node Inspector (v0.7.0 or v0.6.2). Can you reproduce the problem there too?

You can also try the latest version from the github

$ npm install -g node-inspector/node-inspector

Regardless of the result, please fill a github issue (link) and include the result in the description.

Disclaimer: I am the maintainer of Node Inspector.

Miroslav Bajtoš
  • 10,667
  • 1
  • 41
  • 99
0

If you are using windows. Please check for already working service to that port (3000 in your case). Go to Task Manager => Services and seek for any service that is already using that port (PID). If this port found to be used already by any other service, then try changing your default port and run your debugging to other free port. I used "node inspector" to shift debugging to another port by using command

node-inspector --web-port=<your port number>

Suresh Prajapati
  • 3,991
  • 5
  • 26
  • 38
0

I came across the same problem and I've solved it by the following way.

Change your node version to v6.3.0 or below,then you can solve the problem.

There exists some bugs in high version of node.

You can use gnvm to change your node version or use n to change your node version if you are using linux.

lbs0912
  • 331
  • 1
  • 3
  • 13
0

update the node-inspector to latest version using

sudo npm install -g node-inspector

in my case latest version is v1.0.0 and worked for me.