Last active
August 3, 2016 12:07
-
-
Save zamnuts/848d2c3f5a33b8a3d022 to your computer and use it in GitHub Desktop.
enable break on exception
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* filename: index.js | |
* run: node--debug-brk index.js | |
* tested in node v0.10.30 | |
*/ | |
global.v8debug.Debug.setBreakOnException(); // enable it, global.v8debug is only defined when --debug flag is set | |
setTimeout(function() { | |
bogus(); // should break here, "`bogus` is not defined" | |
},2000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
should be used to match you article name.