Malicious web scripts are somewhat different beasts to binary malware. While the analyzing approach is quite similar to binary malwares, the tools are a little different. Firebug is a web development and testing tool that will function as a generic debugger for our purposes.
The feature set of Firebug from the official site:
Inspect HTML and modify style and layout in realtime
Use the most advanced Javascript debugger available for any browser
Accurately analyze network usage and performance
Extend Firebug and add features to make Firebug even more powerful
Get the information you need to get it done with Firebug
In the preceding image, you can see that the Script tab is what interests us most for this particular session. The leftmost pane is line numbered and the red balls are breakpoints. You can right-click it to open a conditional breakpoint dialog for evaluating the expressions. The entire set of scripts...