Debugging Firebug

From FirebugWiki
Jump to: navigation, search

This article aims at listing ways to debug Firebug and its extensions.

JavaScript debugging[edit]


FBTrace is a Firefox add-on to use with Firebug. You're offered an interface that lists logs while Firebug is running.

Browser Toolbox[edit]

From version 19, Firefox offers a Browser Toolbox that allows to debug chrome JavaScript. This is very useful to debug Firebug and its extensions step by step.

dump() and the System Console[edit]

At some point good old dump() into the system console can be also an effective strategy how to hunt a bug.


Chromebug is not maintained anymore at this moment. The Browser Debugger is a replacement for this.

HTML/CSS debugging[edit]

Browser Toolbox[edit]

From version 19, Firefox offers a Browser Toolbox that allows to debug XUL and other elements inside the chrome.


It's somewhat broken, but if you open chrome://browser/content/browser.xul and then Firebug from within there, it's possible to use an outer Firebug to inspect it. Make sure to turn on the "Show UA Stylesheets" option, and use "Right-click -> Add Rule" to add new CSS. (This might work for debugging JavaScript also; I haven't tried it.)

DOM Inspector[edit]

DOM Inspector is a Firefox add-on which is able to change CSS/HTML of chrome documents. Rather cludgy UI. Start by "File -> Inspect Chrome Document -> Firebug".

Element Inspector[edit]

Element Inspector is an add-on to use with DOM Inspector. Just press Shift and right-click somewhere to display the matching element in DOM Inspector.

If DOM Inspector is not installed, it opens it in Firebug.


Bisecting consists in locating a commit that introduced a regression proceeding by dichotomy. It can be either run manually or automatically (using FBTest).

Bisecting Firebug[edit]

See how to bisect Firebug manually and automatically.

Bisecting Firefox[edit]

Sometimes, regressions are due to regressions in the Firefox code.

To report a bugzilla, it is quite helpful to give the first nightly in which the regression has been introduced. To do so, you can consider using mozregression (see also how to run it with Firebug).

Other Links[edit]