Closed iliakan closed 9 years ago
trace supports io.js - if it doesn't then it is a bug.
I see now that some stuff changed between 2.0.0 and io.js 2.0.1, I will update trace so it support the new API, shouldn't be too hard.
require('trace');
function f(ms) {
setTimeout(function() {
throw new Error("BAH!");
}, ms);
}
function g() {
f(10);
}
g();
This shows the trace like:
.../trace/long-stack-trace.js:5
throw new Error("BAH!");
^
Error: BAH!
at null._onTimeout (.../trace/long-stack-trace.js:5:11)
at Timer.listOnTimeout (timers.js:89:15)
I guess the trace should be longer?
io 1.8.1 trace 1.1.0
Yeah, io.js 1.6.0 actually introduced a breaking change, such that the timers wouldn't allow long stack traces. Should work now, trace 1.2.0 is just released. Tell me if it don't work :)
Thanks, it does work now :+1:
Is trace compatible with io.js? Or is it going to be?
If not, maybe there are other ways to get a long stack trace w/ io.js that @AndreasMadsen could advice being a member of the Tracing WG?