Quick Tip, “Firebug breakpoints not breaking!”
When using FireBug to step through your JavaScript code in FireFox, sometimes it does not break on a line that you know is being executed. If you are like me you are like WTF, what is going on? I eventually realized that the reason FireBug was not breaking on some lines of my code was that the code I set my breakpoint on was inline and not inside a function. Apparently FireBug will not break on a line that is not inside a function. A quick fix for this is to wrap your code in a function and call the function immediately after declaring the function.
Instead of:
var foo = "stuff";
alert(foo);
Use:
function showFoo(){
var foo = "stuff";
alert(foo);
}
showFoo();
In the second block you can put breakpoints on either line inside the function showFoo() and FireBug will break when you expect it to.




















