Attach debugger

It would be great if we could attach a debugger to our node process. For the front-end, we can use developer tools to step through the code, but there’s no way to do this for the back-end. I noticed the --debug flag starts a listener (e.g. “Debugger listening on port 5858”), but there’s no way to connect to the listener (i.e. node debug

1 Like

Thanks for the feedback @johntron, we’re definitely interested in exploring a way to enable attaching a debugger and will look into this.

1 Like

Hi johntron :slight_smile:

I faced the same issue, and I have worked on this project (was!/project/shy-kicker) that exposes a webconsole-like interface (the Chrome tools) to debug the backend. It is awesome, but of course for now you can debug only up to the point in which the “real” server starts listening to the same port.

We will work on making more ports available for each project :slight_smile:


That’s a great, simple workaround @etamponi! I would’ve never thought of that. Unfortunately, sharing ports with the real server is a critical design flaw, but it would be difficult to workaround that (maybe multiplexing over a websocket?), and it’s still really helpful for a lot of use cases.

Hi there Emanuele.

The shy-kicker project looks interesting but it is no longer around any chance you can reinstate it?


Hi Mike

the project is now called node-inspector, but I haven’t played with it for a long time… It has some major limitations (it listens on the only port exposed by the container) so I don’t think it will be very useful at the moment, if not to debug the setup code (before the node server actually listens).

Good luck!