An excellent extension to Firefox that helps debug javascript is called Firebug. To add Firebug go to their homepage and download the version corresponding to the version of Firefox you have. Once it is downloaded drag the *.xpi file to Firefox to install.

Take the time to read how Firebug works and what it can do.
Here’s an example of how use it. With Openlayers 2.8 there is a WMS-T example that displays cloud cover for different dates and times. The initial bounds are around hurricane Katrina in New Orleans and I want to change it to Southern Ontario, Parry Sound area. Here is part of the code for the wmst. html file.
![]()
I will pan and zoom into the area I want displayed and open the Firebug console by typing cntrl+shift+L
I will type map.getExtent().toBBOX() and click run to get the current map extents. I can then copy and paste the new bounds back into the wmst.html file and save it.
Where FireBug also comes in handy is to point out where mistakes in coding have taken place. For example, if I deleted the closing brackets at the end, I would get an error message (bottom right)
When I click on this error it will tell me where the error is and what’s wrong .

Note that there is a Lite version for IE but I’ve never tried it.