Not only is Mozilla an exceptional web browser, it’s also an excellent tool for web site development, testing and debugging.

One of the development tools included in Mozilla is the JavaScript Console. The JavaScript Console displays errors, warnings and other messages that may be triggered by JavaScript code. The JavaScript Console will also report errors triggered by CSS errors and by Mozilla interface code.

To use the JavaScript Console, simply open it from Web Development under the Tools menu. The JavaScript Console is also available in Firefox under the Tools menu.

Once you’ve opened the JavaScript Console, click the Clear button before refreshing the browser window. Keep the console window visible alongside your main browser window. When you load pages in the browser any errors that are encountered will be immediately reported in the console window. The report will include information about the type and location of the error. The JavaScript Console will present a link that will allow you to jump to the problematic line of code inside the View Source window.

In addition to reporting errors encountered in the main browser window, the JavaScript Console allows you to test snippets of JavaScript code directly in the console. With the JavaScript Console window in the foreground, make sure the JavaScript Entry field is available by selecting it from the Show/Hide command under the View menu. Once it’s enabled, you can type your JavaScript code directly into the field and then evaluate it by clicking the Evaluate button or by pressing Enter.

Additional technical information about the JavaScript Console is available at the MozillaZine knowledgebase.


 

Comments are closed.

Set your Twitter account name in your settings to use the TwitterBar Section.