mark
mark

Reputation: 62886

Failing to debug with node-inspector - what is wrong?

I have a javascript code that checks whether a point is inside a polygon. I am trying to debug it with node-inspector, following these steps:

In the first window:

PS Z:\dev> node-inspector.cmd
   info  - socket.io started
visit http://0.0.0.0:8080/debug?port=5858 to start debugging

In the second window:

PS Z:\dev\poc\SDR> node --debug-brk .\IsPointInside.js
debugger listening on port 5858

Now I navigate to http://localhost:8080/debug?port=5858 in my Chrome browser.

What happens is that Chrome gets stuck waiting for localhost presenting me the empty screen.

I must add that I have successfully debugged the r.js javascript optimizer using the same steps before, but now I cannot debug it as well.

Upvotes: 4

Views: 1268

Answers (2)

QingHai
QingHai

Reputation: 138

You can also send a "debug on demand" command. Use this command:

kill -USR1 $PROCESSID

Upvotes: 1

AlonEl
AlonEl

Reputation: 81

according to this there seems to be an order in which the components should be started.

Its application -> debugger -> web browser.

Could be your issue.

Upvotes: 1

Related Questions