Experience-Monks / devtool

[OBSOLETE] runs Node.js programs through Chromium DevTools
MIT License
3.76k stars 148 forks source link

Add flag to disable process.exit() #108

Open Roger-Heathcote opened 7 years ago

Roger-Heathcote commented 7 years ago

I'm have some code that runs a few tests then calls process.exit(). Without process.exit the code never terminates in node on the command line which breaks my automated tests. However if I'm using devtool this means the windows closes before I can see the test results and I don't get to check what state it was in just before exiting. Right now I'm just inserting a debugger statement just before process.exit so it's not a big deal but a command line flag to prevent process.exit closing the window would be lovely.

aleclarson commented 6 years ago

The snippet below would work, too. But I agree that devtool should have this by default.

process.on('exit', function() {
  debugger;
});