Instantly share code, notes, and snippets.

Embed
What would you like to do?
enable break on exception
/*
* 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);
@pyhedgehog

This comment has been minimized.

pyhedgehog commented Mar 30, 2015

global.v8debug.Debug.setBreakOnUncaughtException();

should be used to match you article name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment