home forums resources search newsjoinmembers: 6057
Hiveminds Network: Joomla Wordpress Drupal Fireorb Flash Java PHP Ruby Windows Linux
Hiveminds | Tue, 2008-04-29 15:03  tags: , ,

There have been a few websites giving notice to Opera's soon to come developer tool, Dragonfly. Dragonfly is a javascript debugging tool for the Opera web browser. Microsoft is also coming out with its own javascript debugger in a developer tools package. But is having a bunch of debugger tools in each web browser what developers want? Probably not. Luckily The makers of Firebug have come up with a solution. It's called Firebug Lite.

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

console.log()
to write to Firebug's console, you'll wind up with JavaScript errors in these other browsers, and that's no fun.

The solution is Firebug Lite, a JavaScript file you can insert into your pages to simulate the Firebug console in browsers that are not named "Firefox".

Installing Firebug Lite

First, download firebuglite.zip and unzip it into any directory on your web server. Then insert this line of code into any page that you want to contain Firebug:

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

If you don't care to simulate the Firebug console, but you want to prevent calls to

console.log()
from causing errors, then just change the file name in the snippet above to "firebugx.js", like so:

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

If you don't want to install Firebug Lite, but you just want to avoid those annoying JavaScript errors, grab firebugx.js here and just copy and paste it into your code.

Using Firebug Lite

Firebug Lite won't intrude on your page until you open it yourself. Just hit the trusty F12 key to open the console - it will appear at the bottom of the page just like the real Firebug.

You'll soon get tired of hitting F12 after every time you reload the page. If you want the Firebug console to be open every time you load the page, just add

debug="true"
to the html element of your page, like so:

<html debug="true">

Using the Command Line

Firebug Lite also contains a command line, just like its big brother. You can use the same shortcut you use in Firebug to focus the command like, , Ctrl+Shift+L (or ⌘+Shift+L on Mac).


Happy Publishing!

Hiveminds's picture
This article brought to you by the Hiveminds Magazine - Staff. Contact us if you want to post an article or announcement anonymously
 
Bitrix Site manager - fast to create, easy to manage CMS Comparison Matrix
Put Your Site Here Developer Links
Joomla! Adobe Flex Wordpress Web Developers Content Management Systems Adobe Flex PHP Wordpress Web Developers Content Management Systems
 

Newsletter

Get updates on Hiveminds services, articles and downloads by signing up for the newsletter.

Editor's choice

Some of the better articles, stories and tutorials found at Hiveminds.

Find more

Find more of Hiveminds articles, stories, tutorials and user comments by searching.




Picked links

Hand picked websites and articles from around the web that provide quality reading.