Friday, 26 May 2017

NodeJS Tools Remote Debugger Not Attaching to Raspberry Pi

I am trying to debug a nodejs app running on a Raspberry Pi. Both the Pi and my development machine are on the same LAN. I'm using Visual Studio 2017 and the NodeJs Tools for Visual Studio 2017.

I start the debugger on the Pi like this:

$ nodejs --debug-brk RemoteDebug.js app.js

debugger listening on port 5858

I'm using the --debug-brk switch because the bug I'm trying to find throws an exception during the app's startup, so I need nodejs to wait until a debugger is attached.

When I try to attach to the remote process from within Visual Studio I get the following error:

Could not attach to Node.js process at tcp://majordomo:5858/:

No connection could be made because the target machine actively refused it 10.0.0.78:5858

I've confirmed that Visual Studio 2017 is allowed to access private networks through the Windows firewall.

How do I open the port on the Pi side? I thought that the message the debugger is listening on 5858 meant the port was "open", but that's clearly not the case.



via Mark Olbert

No comments:

Post a Comment