Skip to content

Instantly share code, notes, and snippets.

@xsurge83
Created June 10, 2013 14:34
Show Gist options
  • Save xsurge83/5749166 to your computer and use it in GitHub Desktop.
Save xsurge83/5749166 to your computer and use it in GitHub Desktop.
trace
exports.trace = function(label) {
// TODO probably can to do this better with V8's debug object once that is
// exposed.
var err = new Error;
err.name = 'Trace';
err.message = label || '';
Error.captureStackTrace(err, arguments.callee);
console.error(err.stack);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment