I just found out a feature of Chromes debugger today, that I was searching for a while, but never found out:
How to set breakpoints in code, so that when you run over a function the debugger will automatically stop at that line of code.
Whenever you use the special keyword
debugger in your script, FireBug / Chrome will treat that line as if it was a breakpoint, and stop your script right there.
This is so handy! Of course you can still set breakpoints by clicking on the line number in debugger.
So have fun debugging your code!