Firefox Web Console | UA - User Agents
Standards Based Development
Firefox 4 deprecated the old Error Console in favor of the Web Console, which is a heads-up display for the web, allowing developers to view error messages and other logged information. The Web Console also allows for methods that can be called to output information to the console, making it useful in debugging, as well as allowing the evaluation of JavaScript on the fly.
Open the Web Console by selecting the "Web Console" option from the Web Developer submenu in the Firefox Menu (depending on your settings, it could be the Tools Menu), or by pressing control+shift+k keyboard shortcut.
Using the Web Console
The Web Console's interface has four areas: the toolbar, the log, the command line, and the resize bar.
The log can display four types of messages:
- Network Messages
- Are generated by the browser, alerting the user of network requests. Clicking on a network request will give you a look at the headers and other information about the request, including the response. Right-clicking on the log and selecting the option "Log Request and Response Bodies" from the contextual menu allows you to actually log the entire request and response, including the data.
- css Messages
- Are generated by the browser to inform the developer of css errors that occur while rendering content.
- JavaScript Messages
Are used by the browser to inform the developer of JavaScript errors, such as syntax errors, that occur while interpreting JavaScript code. The documentation for
nsIScriptErroron mdn contains a list of all JavaScript errors and messages.- Logging Messages
Are output explicitly by JavaScript code by using methods on the
consoleobject provided by the browser.
If the same message is output multiple times, the Web Console will only list it once, placing a counter to the right showing how many times (if) it was repeated, to save space so the log is more readable.