What is Firebug?
Firebug integrates with Firefox to put a wealth of development tools at our fingertips while we browse a website. Firebug allows us to understand and analyze the complex interactions that take place between various elements of any web page when it is loaded by a browser.
Although Firebug allows us to make changes to the source code of our web page, the changes are made to the copy of the HTML code that has been sent to the browser by the server. Any changes to the code are made in the copy that is available with the browser. The changes don't get reflected in the code that is on the server. So, in order to ensure that the changes are permanent, corresponding changes have to be made in the code that resides on the server.
The history of Firebug
Firebug was initially developed by Joe Hewitt, one of the original Firefox creators, while working at Parakey Inc. Facebook purchased Parakey in July, 2007.
Currently, the open source development and extension of Firebug is overseen by the Firebug Working Group. It has representation from Mozilla, Google, Yahoo, IBM, Facebook, and many other companies.
Firebug 1.0 Beta was released in December 2006. Firebug usage has grown very fast since then. Approximately 1.3 million users have Firebug installed as of January 2009.
The latest version of Firebug is 1.5. Today, Firebug has a very open and thriving community. Some individuals as well as some companies have developed very useful plugins on top of Firebug.
The need for Firebug
Firebug fills this gap very nicely—it provides all the tools that today's web developer needs in order to be productive and efficient with code that runs in the browser.
Firebug has a host of features that allow us to do the following (and much more!):
- Inspect and edit HTML
- Inspect and edit CSS and visualize CSS metrics
- Use a performance tuning application
- Explore the DOM
- Analyze AJAX calls
Installing Firebug on different browsers
Based on your browser version, we can install the corresponding Firebug version.
Firefox 3.5 and Firefox 3.6
Firefox 3.0 and Firefox 3.5
Firefox 2.0 and Firefox 3.0
IE, Safari, and Opera
Installing Firebug on Firefox
To install Firebug on Firefox, we will follow these steps:
- Open Firefox browser and go to https://addons.mozilla.org.
- In the search box of the site, type Firebug and hit Enter or click on the Search for add-ons button.
- In the search results, click on Add to Firefox button.
- A pop up will appear asking whether we want to continue with the installation. We will now click Install now.
- After installation is complete, let's restart Firefox.
When the browser comes up, it will prompt us by saying a new add-on has been installed. Now we are all set and ready to play with Firebug.
Installing Firebug on non-Firefox browsers
To use Firebug Lite on non-Firefox browsers, we should include the following line of code in our page:
For more information and updates on Firebug Lite, refer to http://getfirebug.com/lite.html.
We can inject Firebug into any page by running the bookmarklet created with the preceding URL.
Opening and closing Firebug
Opening and closing Firebug is very easy. We can open as well as close Firebug by pressing the F12 key or by clicking the (bug) icon on the right-hand side of the browser's status bar.
By default Firebug opens in a dock view. If we want to open it in its own window, we can accomplish this by either clicking on the icon on the upper right corner of Firebug or by pressing the keys Ctrl+F12.
Firebug can be opened in the following two modes:
- Dock view
- Window mode
In the dock mode, the Firebug opens the document in the browser's window while in the window mode the Firebug opens in its own window, which is separate from the browser window.
Most often we use the dock view mode of Firebug while developing. In this mode, the inspection and CSS tweaking can be done more easily than in window mode. The advantage of this mode is that the user can view the rendered page while simultaneously working on Firebug.
Firebug is an extremely useful web design and development tool that integrates seamlessly with Firefox. Firebug has a huge worldwide user base along with a very open and thriving eco-system.
We now have an idea of how to install Firebug on Firefox and Firebug Lite on non-Firefox browsers. Installing Firebug is as simple as installing any other add-on or extension of Firefox. We have also seen some of the ways of opening, closing, and undocking Firebug, and learned when to use dock view and when to use window mode for different purposes.
If you have read this article you may be interested to view :