An introduction to FireBug

An introduction to FireBug
By ID Media | Friday 1st July 2016

Firebug is a free and open-source web browser extension for Mozilla Firefox that facilitates the live debugging, editing, and monitoring of any website’s CSS, HTML, DOM, XHR, and JavaScript.

Firebug is licensed under the BSD license and was initially written in January 2006 by Joe Hewitt, one of the original Firefox creators. The Firebug Working Group oversees the open source development and extension of Firebug. It has two major implementations: an extension for Mozilla Firefox and a bookmarked implementation called Firebug Lite which can be used with Google Chrome.

In addition to debugging web pages, Firebug is a useful tool for web security testing and web page performance analysis.

Features

Firebug makes changes immediately and gives constant feedback to the user. All editors in Firebug support auto complete.

The Firebug command line accepts commands written in JavaScript. The result of executing each command is displayed in the console, appearing as hyperlinks. The Firebug application contains multiple windows, splitting related features to a common window. Firebug also allows users to view the download time for individual files. It separates different types of objects, such as JavaScript files and images, and can determined which files are loaded from a browser’s cache. Firebug also features the ability to examine HTTP headers and time stamps relative to when an HTTP request is made. Its net panel can monitor URLs that the browser requests, such as external CSS, JavaScript, and image files.

HTML and CSS

The HTML and CSS tools allow for the inspection and editing of HTML and CSS elements on a web page. Later versions of Firebug allow users to see live changes to the CSS. Visualization of CSS elements is shown while inspecting HTML elements. The Firebug layout tab is used to display and manipulate CSS property values. Furthermore, users can click on any visible HTML elements on a web page to access its CSS property values.

JavaScript Console

Firebug’s script tab enables users to set breakpoints and step through lines of code. Additionally, Firebug can navigate directly to a line of JavaScript code, watch expressions, call stacks, and launch the debugger in the event an error occurs during execution. Firebug can also log errors. Logging uses a Firebug JavaScript API. Firebug’s JavaScript panel can log errors; profile function calls, and enable the developer to run arbitrary JavaScript. Firebug allows users to run JavaScript code through the command line and allows the user to log errors that occur in the JavaScript, CSS, and XML. Firebug provides a separate text editor to modify the JavaScript and see immediate results on the user’s browser.

As provided in an update, the JavaScript command line features an auto complete function. The text editor also provides the ability to write full functions. Firebug requires a user to refresh a web page in the event of a crash.

Extensions

Many extensions have been made to enhance the Firebug experience. Since Firebug is open source, users can contribute their own extensions to the Firebug community.