Framework-agnostic, micro-library for getting stack traces in all environments
Just include stacktrace.js file on your page, and call it like so:
You can also pass in your own Error to get a stacktrace not available in IE or Safari 5-
Note that error message is not included in stack trace.
Bookmarklet available on the project home page.
You can now have any (public or privileged) function give you a stacktrace when it is called:
console.logstackjoin'\n';var p = ;pinstrumentFunctionthis 'baz' logStackTrace;var a = 1;bar;baz;foo; //Will log a stacktrace when 'baz()' is called containing 'foo()'!pdeinstrumentFunctionthis 'baz'; //Remove function instrumentation
npm install stacktrace-jsbower install stacktrace-jscomponent install stacktrace.jswget
It is currently tested and working on:
This project is made possible due to the efforts of these fine people: