Javascript backtrace

江枫思渺然 提交于 2019-12-05 02:20:42
Quasdunk

maybe this might help you, haven't worked with it yet though:

This link is no longer active: kallewoof.com/2006/03/15/precompiling-javascript-functions/

also have a look at this:

How do you find out the caller function in JavaScript?

In my debugging experience, I always use this

(function () { console.log(new Error().stack); })();

As the comments below suggested, the readers should prefer: console.log(new Error().stack);

This lib: stacktrace-js works anywhere, not only with errors.

Example:

StackTrace.get()
    .then(stack => { console.log(stack) })
    .catch(err => { console.log(err) });
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!