I would like to connect to my node server running in debug mode on AWS (node --debug app.js) from my development machine, and be able to debug my app remotely.
Two quest
You can use node --inspect too in your remote machine.
node --inspect myapp.jsssh -L 9229:127.0.0.1:9229 myuser@myserver -N chrome-devtools://devtools/remote/serve_file/@60cd6e859b9ff284980/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:9229/bef2ae68Enjoy :)
If you are using pm2 just add this on your ecosystem.js
"apps": [{
"name": "myapp",
"script": "index.js",
"node_args": ["--inspect"],
...