Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I am looking for a tool (preferably a plugin to Firefox) that will show and parse all the JS in a page as I browse.

UPDATE:

Most tools focus on the HTML parser. I need good js parsing e.g. list of all JS functions in a webpage, with includes...

Try Firebug on this link http://www.google-analytics.com/ga.js and you get sore eyes.

share|improve this question

closed as off topic by Eight Days of Malaise, phwd Mar 20 '12 at 7:32

Questions on Web Applications Stack Exchange are expected to relate to web applications within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Would this be firebug? addons.mozilla.org/zh-TW/firefox/addon/firebug –  bobo Mar 15 '12 at 19:30
    
See update about. In short, i need more powerful js parsing –  OA1 Mar 15 '12 at 21:22
    
you may try firerainbow.binaryage.com –  Ashutosh Dave Mar 16 '12 at 7:08
add comment

1 Answer

Firebug or Chrome Developer Tools is probably your best bet.

Chrome Developer Tools has a "pretty print" feature that allows you to deobfuscate JavaScript code, making it easier to read. You can get the same feature in Firebug by installing the JavaScript Deminifier extension, or you can just use JSBeautifier if you want to deobfuscate an individual JavaScript file.

When debugging in either Firebug or Chrome Dev Tools, you can see a list of all JavaScript variables and functions available within the local or global scope. In Chrome, you can even edit the JavaScript dynamically. Last year's Google I/O presentation explains how to use Chrome to debug JavaScript.

If your end goal is to read through or understand a piece of JavaScript, something like JSBeautifier should suffice, perhaps in addition to jsFiddle if you want to do some testing. Otherwise, if your goal is to understand JavaScript within the context of a website, using Firebug or Chrome Dev Tools to set breakpoints and step through the JavaScript code should work well. I personally use both when perusing JavaScript files in web apps, and they both have suited my needs just fine.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.