When I need a stack trace, I do the following, maybe you can draw inspiration:
function logStackTrace(levels) { var callstack = []; var isCallstackPopulated = false; try { i.dont.exist += 0;
Note moderator . The code in this answer also appears in this entry from Eric Wenderlin's blog . The author of this answer claims this as his own code, though, written before the blog post linked here. For good faith, I added a link to the message and this note.
Martin Jespersen Jan 12 '11 at 17:07 2011-01-12 17:07
source share