I use \'forever\' to run my application. I want to attach to the running environment to inspect my application. So what can I do?
Even it's an old yet answered question, there is an easier way, which is passing parameters to node:
forever start -c 'node --debug-brk' main.js
If you don't want to wait for debugger to be attached, replace --debug-brk by --debug
--debug-brk
--debug