I need to get a full call stack when an exception occurs in JavaScript on Internet Explorer 8. Function calls may occur between frames whose number is large.
Call stack necessary to send logs to the developers. I cannot use a debugger, because the end user does not have to deal with this problem.
The current solution for JavaScripts provided it can generate callstack (http://eriwen.com/javascript/js-stack-trace/). It is based on arguments.callee.caller. But the caller returns zero ( undefined ) if the function was called from outside the current frame. Thus callstack obtained is incomplete.
Can I get the name of a frame from which the function was called in this case?
Solution based on Active Scripts Technology gives an object of type ScriptEngine: IHTMLDocument:: get_Script (IDispatch ** p)
But casting object "script" to the interface IActiveScript fails.
*Can I get out of IE8 the link to be used for a given context ScriptEngine, to extract the necessary information to construct the callstack?