Error 10054. Debugging a locally running node.exe process with VS

Nov 22, 2014 at 2:26 AM
I have Visual Studio 2013 with NTVS 1.0 Beta 3. I am trying to debug a node.js project by attaching to a locally running node.exe process from VS. I followed the instructions in the documentation. I get an 'Error 10054' in the command prompt running node and none of the breakpoints get hit.
Any suggestions?
Coordinator
Nov 22, 2014 at 3:28 AM
Edited Nov 22, 2014 at 3:29 AM
This particular scenario had some rather confusing documentation previously (and, quite possibly, currently). Are you trying to attach to node.exe directly, or are you using the debug proxy? And are you attaching to 127.0.0.1, or using your real IP or machine name?
Nov 22, 2014 at 5:00 AM
I am trying to connect to node.exe directly.
In the node command prompt I run
Node.exe --debug bin\www (www is my startup file)

In VS I select “Attach to Process”
Transport: “Node remote debugging”
Qualifier: localhost:5858
Refresh
Attach

VS seems to attach successfully, but in the node command prompt I see “Error 10054”, and none of my breakpoints are hit.
Thanks for looking into this,
Coordinator
Nov 22, 2014 at 5:32 AM
We had run into similar issues before with no clear indication of why this goes wrong. The workaround that is consistently working so far is to use the remote debug proxy, directing it at localhost. Just keep in mind that, in order to attach to the proxy, you need to specify your machine name rather than localhost when attaching.
Nov 22, 2014 at 6:30 PM
I tried that, VS attaches to the process but again I don't hit any of my breakpoints. This is what I see in the command prompt:

node: node.exe
scriptToDebug: bin\www
passThroughArgs:
localClientPort: localhost:5859
remoteServerPort: MARYANNSMAC:5858
startDebuggeeOnRemoteConnect: false
startDebuggeeBrokenAtEntryPoint: false
remoteServerSocket listening for connection
Debuggee started: node.exe --debug=5859 bin\www
debugger listening on port 5859
env not found undefined
Started psdb module in ENV_NOT_FOUND ...
remoteServerSocket connected
localClientSocket connected
remoteServerSocket disconnected
remoteServerSocket connected