3 ms·
Until Node gets long stack traces natively (as mentioned in the slides) check out this hack: https://github.com/tlrobinson/long-stack-traces https://github.com/
by tlrobinson 16y ago
Until Node gets long stack traces natively (as mentioned in the slides) check out this hack: https://github.com/tlrobinson/long-stack-traces https://github.com/tlrobinson/long-stack-traces
It works in stock Chrome too, since it's implemented in JavaScript using V8's stack trace API.
Caveats: There is some performance penalty. Not for use in production. May "leak" memory in certain situations (e.x. function foo() { setTimeout(foo, ms); })