Question: 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 questions:

* Can I do this with node-inspector? I wish I could, but node-inspector fails to install on my AWS instance.
* Any alternatives that will allow me to do this?

Answer: 
One more option to use `0.0.0.0` to listen to request from outside:

```
node-debug --web-host=0.0.0.0 --cli app.js

```

and visit this address to debug:

```
http://<the-domain>:8080/?port=5858

```

it would be better if HTTP/2 is available since there are lots of small files.
This is what worked for me:

1. Start node-inspector on server.
2. Start debugee on remote server with `--debug` flag.
3. Note the port that the debugger listens on, i.e. `Debugger listening on port DEBUG_PORT` message.
4. Create an ssh tunnel for port `8080`, not the `DEBUG_PORT` as Andrey Sidorov's answer suggests.
5. Open `SERVER_API:8080/debug?ws=127.0.0.1:8080&port=DEBUG_PORT` in browser an voilà.

Node Inspector v0.10.1