Can someone tell me how I can get a call trace between different JavaScripts?
Suppose I have an HTML page that loads some JavaScript files, which in turn may load other JavaScript files from the server. Is there a way that I can trace which JavaScript page is loaded from what other JavaScript pages?
I've used Google Chrome speed tracer extension, and can get the event trace of the browser, normally JavaScript evaluation events were registered, but not all of the registered events have the attribute specifying what other script triggered the evaluation.
I've also used Firebug, but it seems it's more useful in debugging JavaScript instead of what I want.
Let's say an HTML file has a tag <script type="text/javascript" src="A.js">
And in A.js
, it invokes a function defined in B.js
. In this function, another function in C.js
is called and thus C.js
will be downloaded (suppose C.js
hasn't been downloaded and loaded yet).
I just want to know if it is possible to find this "call trace" of A.js-->B.js-->C.js
, and also the "downloading sequence" of A.js
, B.js
and C.js
if initially none of them was downloaded.
Yes, it is possible to investigate this by going through the code manually, but I'm trying to understand the relationships of .js files of a fairly large website, which may contain too many JavaScript files to be handled manually.
Thanks. I hope this may clarify the question.