To set up Node remote debugging, simply run the node process with the --debug
flag. You can add a port on which the debugger should run using --debug=<port>
.
When your node process starts up you should see the message
Debugger listening on port <port>
Which will tell you that everything is good to go.
Then you set up the remote debugging target in your specific IDE.
Once those are configured simply run the debug target as you normally would and it will stop on your breakpoints.
If you start your application on Linux, use the proxy for debugging via port, for example:
socat TCP-LISTEN:9958,fork TCP:127.0.0.1:5858 &
Use port 9958 for remote debugging then.