Debugging Java script

I found Javascript as big boss who become angry from u with out mention any thing, since it is client side language and I am a PHP developer for form validation i have to use it.
Debugging a java script code is always a big problem for me but Fire bug, a Addon in Firefox makes life little easier.
It provides good environment to debug your client side script just like visual studio fashion. Here you can add break points on code under script tab and with buttons on right you can step into your code and can see step by step execution. There are several navigation buttons are provided to execute code line by line.