Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

The Error Console is deprecated in Firefox, and is now only made available if you set the devtools.errorconsole.enabled preference to true. Use the Web Console instead, for web content, or the Browser Console for chrome content.

The Error Console is a tool available in most Mozilla-based applications that is used for reporting errors in the application chrome and in web pages user opens. It reports JavaScript-related errors and warnings, CSS errors and arbitrary messages from chrome code. In Firefox, the Error Console can be opened from the tools menu or by Ctrl-Shift-J.

For information about what JavaScript exceptions get logged into the Error Console, and how to make all exceptions get logged, read the article Exception logging in JavaScript. See Setting up extension development environment#Development preferences for the preferences you should set if you want to see errors from Firefox and extensions in the Error console.

Before Gecko 1.8.1 (Firefox 2), it was called JavaScript Console (see bug 265871).

Types of errors

Error
usually a syntax error that prevents the program from compiling.
Warning
usually lets the program compile but warns of bad coding and suggests design flaws.
Message
very similar to warning, used very rarely.

Manipulating data displayed in Error Console

Information displayed in Error Console can be accessed and manipulated through the Console service.

Extensions can write to the Error Console from JavaScript using Components.utils.reportError, or if you're fine with logging to the OS-provided console, dump().

To bring up Error Console from within a browser or mail window, use the function toJavaScriptConsole().

Alternatives

Console2
This extension provides a replacement for Error Console, fixing many of its bugs and implementing long-wanted enhancement requests.
Firebug
The extension for Firefox also integrates the Error Console with various improvements.

 

Document Tags and Contributors

 Last updated by: robhudson,