0

I have tried launching node-inspector using:

 node-inspector
 node-inspector &

I have tried launching my app using:

 node --debug ./bin/www
 node --debug-brk ./bin/www

I am running the app from a vagrant box from which I have used port forwarding for the port 3000 and running the node-inspector on my windows PC.I have tried disabling all my Chrome extensions,I have tried removing and reinstalling node-inspector as well.I have tried adding debugger messages to my files.

I always get this window when I open node-inspector,it does not load any of the applications files for me to set breakpoints.Here is a screenshot of node-inspector.

I have also tried disabling my antivirus(Avast) and that does not work,I have tried forwarding the port 5858.

I have tried starting the default debugger,it just says connecting...:

  node debug localhost:5858

How can I understand what the problem is and how can I solve it?

vamsiampolu
  • 6,328
  • 19
  • 82
  • 183

1 Answers1

1

You need to forward port 5858 as well from your vagrant box to pc. Alternatively, start node-inspector inside vagrant and forward its web port ( 8080 by default )

Andrey Sidorov
  • 24,905
  • 4
  • 62
  • 75
  • Can I start both the `app` and `node-inspector` within the `vagrant` box at the same time?I am already forwarding the port 5858,that does not seem to have worked for me – vamsiampolu Oct 31 '14 at 05:28
  • Yes, you can. You only mentioned you are forwarding port 3000 – Andrey Sidorov Oct 31 '14 at 05:30
  • After the post,I thought,I started forwarding `5858` also,can you tell me what `web-port` and `debug-port` are,I have decieded that I do not want to block 8080,so I want to run it on `3007`,so I am trying `vagrant@precise32:~/app$ node-debug ./bin/www --debug-port 3007 --web-port 3000 Node Inspector is now available from http://localhost:8080/debug?port=5858 Debugging `./bin/www` debugger listening on port 5858` – vamsiampolu Oct 31 '14 at 05:44
  • node-inspector talks to both debugger agent using v8 debugger protocol over tcp:5858 and to web browser ( node-inspector itself acts as web server for that) 5858 here is debugger port and 8080 - web port (port you pointing your browser to connect to inspector). – Andrey Sidorov Oct 31 '14 at 05:53
  • It looks like you need to pass port numbers before your script so node-debug treats them as its own parameters and not script parameters: `node-debug --debug-port 3007 --web-port 3000 ./bin/www` – Andrey Sidorov Oct 31 '14 at 05:54
  • @AndeySidorov I have got this up and running,I was able to find my real error...I got the 8080 port forwarded as well,I used the `node-debug ./bin/www`,then it worked. – vamsiampolu Oct 31 '14 at 06:39