How to remote debug a node.js app on heroku?

You can indeed debug webhooks on your local computer using a free proxy service like ngrok.

If you want to debug it on Heroku, you can view your real-time logs using heroku logs --tail or use an addon service that stores logs.


I would consider using a tool to connect public URLs to an instance of your app running locally.

Option 1: ngrok

An easy one would be ngrok

Option 2: ssh reverse tunneling

If you have access to any Internet-facing server with ssh and admin rights to enable the GatewayPorts yes sshd configuration, you can do it with ssh remote tunneling. For example:

ssh -n -R 8080:localhost:3000 myserver.example.com

Will allow webhooks sent to http://myserver.example.com:8080 to tunnel to your local app listening on port 3000.

More details on ssh tunneling can be found here