Company
Date Published
Author
-
Word count
352
Language
English
Hacker News points
None

Summary

Node.js has a built-in debugger that can be activated in running processes by sending a SIGUSR1 signal, although it only listens on 127.0.0.1, the local interface. To debug a Node.js application running on a company's private network from a laptop, one must SSH into the production host to put the app into debug mode and set up an SSH tunnel to connect the private network with localhost. From the laptop, another SSH tunnel must be established through a bastion host to the production host, enabling remote debugging through an IDE like PyCharm or via the command line. The process involves creating a remote debugging configuration in PyCharm, connecting to the local SSH tunnel, and setting breakpoints to step through the application. If connectivity issues arise, restarting the SSH tunnels and PyCharm debugger is recommended, and users are encouraged to try Rollbar for managing application errors.