Firebug Lite 1.2

From FirebugWiki
Jump to: navigation, search
Fb lite screenshot 1.png

Firebug is an extension for Firefox but what do you do when you need to test your pages in Internet Explorer, Opera and Safari?

The solution is Firebug Lite, a JavaScript file you can insert into your pages to simulate some Firebug features in browsers other than Firefox.

Firebug Lite creates two variables, firebug and console, in the global context and does not affect or interfere with HTML elements that aren't created by itself.

Latest Version: 1.2.3 (2009-05 ChangeLog)


Installing Firebug Lite[edit]

Static on-line installation[edit]

Insert this line of code into any page that you want to contain Firebug Lite:

<script type="text/javascript" src=""></script>

Firebug Lite as a bookmarklet[edit]

Enter the following code into your address bar to use Firebug Lite on any page. You can also copy the code into a bookmark on your toolbar.


Static off-line installation[edit]

Download the source files and save them to a folder in your site's directory. Include firebug-lite-compressed.js or firebug-lite.js in the page(s) that you want to contain Firebug Lite. Search for "firebug-lite.css" in the JavaScript file and replace it with the location of the firebug-lite.css file you downloaded.

<script language="javascript" type="text/javascript" src="/path/to/firebug/firebug-lite.js"></script>

Configuring Firebug Lite[edit]

You can change the height of the Firebug Lite UI with the following code.

<script type="text/javascript">
firebug.env.height = 500;

You can also use your own CSS file to customize Firebug Lite's UI:

<script type="text/javascript">
firebug.env.css = "/myown/firebug.css";

Firebug Lite API[edit]


Firebug Lite supports all of Firebug's basic console methods except console.assert,, console.groupCollapsed, console.groupEnd, console.profile and console.profileEnd.

Firebug Lite does not support string substitution patterns, it simply concatenates arguments together.


Use this method to watch the status of XmlHttpRequest objects.

var request = new XMLHttpRequest();

firebug.watchXHR(request);'GET', '', false);   


Use this method to inspect DOM elements.



Some browsers already declare the console variable. If you observe errors in Safari, for instance, use the console commands in this fashion:

firebug.d.console.cmd.dir([ "test" ]);