Node uses a TCP interface for debugging, so if you can get a handle on the right port, you can debug apps running remotely. This means you can run through code on staging, Vagrant, etc. The following shows you how to start node with the debug flag and use an SSH tunnel to access the right port.
Things you need:
- ssh access to the server
- ability to restart node app with
--debug
flag ornode-inspector
installed on server