captureCalls.js icon indicating copy to clipboard operation
captureCalls.js copied to clipboard

Show argument values in stacktraces

Open NV opened this issue 11 years ago • 0 comments

function run(x, y) {return add(x + 1, y + 1)}
function add(x,y) {return x + y}
captureCalls(run)
run(2, 3)

Expected output:

run(x=2, y=3) -> undefined 
    add(x=3, y=4) -> 7 :6:1

It currently shows:

run(x=2, y=3) -> undefined 
    at <anonymous>:6:1

It seems plausible to implement this using caller and caller.arguments.

NV avatar Nov 22 '13 11:11 NV