Sunday, 6 January 2019

A way to specify --inspect host and port without enabling the debugger

I have a docker container that runs a nodejs application deployed to production, but once in a while, I wouldlike to connect to a production instance to do some debugging, but in most of the cases, I would like tokeep the debugger disabled.If I add `--inspect` to the arguments when starting the application, I assume that would start the debugger at the beginning and slow down production apps (please correct me I'm mistaken), but enabling debugger with `kill -USR1` would start the debugger at `127.0.0.1:9229`, which would limit the scope inside the container.So the question is, is there a way to specify the inspect host to `0.0.0.0` without starting the debugger? Or starting debugger at the beginning in production deployment wouldn't have any negative effects on the performance?Thanks a lot!

Submitted January 07, 2019 at 03:03AM by shivawu

No comments:

Post a Comment