devtool icon indicating copy to clipboard operation
devtool copied to clipboard

Add flag to disable process.exit()

Open Roger-Heathcote opened this issue 9 years ago • 1 comments

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.

Roger-Heathcote avatar Dec 17 '16 16:12 Roger-Heathcote

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

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

aleclarson avatar May 28 '18 15:05 aleclarson