Skip to content Skip to sidebar Skip to footer

How To View All Javascript Functions Called In Real Time?

I want to figure out how a website reloads it's content using AJAX. Therefore i would like to see what JS functions are called in real time because I can't figure out what function

Solution 1:

Maybe using the 'profile' button in the firebug console tab can give you an indication of the function(s) that are fired. Furthermore you can tell firebug's console to show xmlhttp requests (expand 'console' at the top of the firebug screen. After that, If an ajax request fires, it should be visible in the console. In the 'post' tab in such a request you may be able to infer the function triggering the request, looking at the parameters.

Solution 2:

I think what you want is a feature in Chrome:

find the element that is being reloaded and right click, choose inspect from context menu, then right click the html of the element (in the bottom firebugish pane), in the context menu there are options to:

  • break on subtree modifications
  • break on attributes modifications
  • break on node removal

in your case maybe set "break on subtree modifications" on the body tag would do it?

Article on awesome new dev features in chrome: http://www.elijahmanor.com/2011/08/7-chrome-tips-developers-designers-may.html

Solution 3:

Install firebug in FF. Visit this link: http://getfirebug.com/

Solution 4:

I would do a big search and replace on all the file using a regular expression that matches the function names (something like "function (.*)\((.*)\){") and use that to insert a console.log(functionName) at the beginning the function.

So you search for function (.*)\(.*\){ and replace it with function \1 (\2){ console.log("\1"); (Note: Regular expressions are most likely wrong as I didn't check them - you'll need some testing to get it right).

It seems a bit crazy but it should work. I've used that method to debug a Director Lingo project.

Obviously, make sure you backup the whole project before doing the replacement.

Solution 5:

I often using Firefox add-on JavaScript Deobfuscator

https://addons.mozilla.org/en-us/firefox/addon/javascript-deobfuscator/

Post a Comment for "How To View All Javascript Functions Called In Real Time?"