Context
I am trying to understand the internals of a big, hairy JavaScript library.
I already have the un-minified version.
JavaScript’s dynamic-ness is making it hard for me to guess what is happening by just reading the code.
I want something like gdb … where I can “step” through each individual JavaScript function / line of code.
Question:
What browser (Safari? Firefox? Chrome?) should I be using, and with what plugin?
Thanks!
Use the Chrome Developer Tools. A debugger and a profiler are included.
And when you just want to know what’s inside an object, use console.log(obj) : you’ll see its content in a property tree. As there are many tools, I suggest you completely read the official documentation : using them correctly really makes a big difference in your productivity.
A similar tool is now present in Firefox (you had to use Firebug before) but Chrome is more used, partly because of its more powerful js engine (V8).
IE starts to include such a toolset, but it’s really poor and painful to use for now (I guess this will change).