debugging - how to attach a running node.js process and debug WITHOUT a GUI? -


by sending sigusr1 can start internal debugger on port 5858, , can use node-inspect debug running process via gui in browser.

however if host server have no gui, , kind of port(5858) firewalled due security policy. how can debug in local console? using gdb in c/c++?

i tried telnet 5858 locally seems talk in http debugging operations. there existing tool help?

node.js (up @ least version 7.x.x) has built-in cli/text client debugger. access it, start program debug argument; example: node debug server.js.

for details on how navigate debugger, refer documentation.

the documentation includes explanation of how attach running pid (node debug -p <pid>) or how attach process via port 5858 asking (node debug localhost:5858).

as of writing, node.js version 8.0.0 has not been released yet. however, possible cli debugger replaced in version. (just putting here people find answer in future. if node.js version 8.0.0 or later has changed 7.x.x such answer no longer valid, consider adding correct information newer version right here. :-d )


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -