The Firebug extension for Firefox can be used to debug JavaScript, as well as CSS, HTML and DOM.
To start using Firebug, download the extension here. Once the extension is installed, it can be accessed from the Firefox menu bar, under “Tools” – “Firebug.”
To use Firebug to debug JavaScript, I recommend referencing Firebug’s JavaScript documentation, which is located here.
Related articles:
Viewing a Web Site’s JavaScript with Firebug