2

Is there any way to debug or determine what prevents node.js script to exit? All my code run is finished, I removed all event listeners, but process is still active.

Evgeniy P
  • 37
  • 2
  • 4
  • You'll need to include some code to reproduce the issue, or at least a thorough description of what you're doing that may cause the process to stick around. – ssube Feb 18 '15 at 15:23
  • exit when? can you give more info and/or code examples. do you mean error out? do you have logs? – atmd Feb 18 '15 at 15:24
  • Does this answer your question? [Node.js: inspect what's left in the event loop that's preventing the script from exiting naturally](https://stackoverflow.com/questions/26057328/node-js-inspect-whats-left-in-the-event-loop-thats-preventing-the-script-from) – SWdV Aug 25 '22 at 11:58

1 Answers1

0

You can use process.exit(<code>) to leave the program and check what they call "event loop" too

source : http://nodejs.org/api/process.html#process_process_exit_code

and : http://nodejs.org/api/repl.html

Waxo
  • 1,816
  • 16
  • 25