3 FireBug Tips Every Web Developer Should Know
March 9th, 2010 by
It is nearly impossible to overrate FireBug as a web development tool.
One of its awesome qualities is that it lets you test design changes on the fly, without actually changing the code.
Here are some examples:
Editing a specific element style
To add style properties to elements that already have CSS styles declared, you need to:
- Right click on the element you want to edit style for and select Inspect Element.
- Right click anywhere in the right pane in FireBug window, and select New Property.
- Type the new property and its value
But what if you wanted to test different looks on an element that has no declaration in your CSS file? or maybe to add style properties only to the first li (list item) tag in a list, and not to the rest of the items in that list?
In this case, follow the 3 simple steps described below and then type the new property and its value.

Adding an attribute to an HTML element
hmmm… maybe my gravar image will look better when aligned to the right instead of left?
I can test it really quickly like this:

Testing new images in your live site without adding them to the code
How about adding a nice Digg icon below my posts, just below those RSS and twitter icons?
First I need to find a icon that may be suitable (and free for commercial use), and then follow these steps:

Now I can go back to my blog and past that img tag:

Nice, eh?
This was only the tip of the iceberg, though. Firebug has a lot more great features so I will post some more tips in the future.
The real beauty of firebug is the ability to test changes in live websites without duplicating the site, because these changes appear in your own private browser only, and don’t have any effect on other site visitors.
Want to add something? Have a question? Shoot!

I can’t imagine the work without Firebug anymore. Before firebug i had to change and refresh everytime.
Lucian, I couldn’t agree more on that. Firebug takes web development to a new level by saving a great deal of work time.
Firebug is amazing. Don’t forget the profiling bit. “so easy, a caveman could do it”.
I absolutely agree, it’s an impressive tool and yet very easy to learn.
).
It practically makes a web developer’s life better (when I say life, I mean his work of course
Great article. Thanks for sharing.
Great article. Those are definitely important tasks that web devs should know. Probably the option that gets the least love, though, is stepping though JavaScript code. Extremely useful when debugging, but I don’t see many people talk about it. I love the profiler as well.
@Dan,
Thanks for sharing. I use the javascript debugging feature of Firebug a lot on a regular basis, and I intend give some tips about it in the future.
I forgot how much useful firebug is. I removed firebug about a year ago when Firefox and firebug would crash so often. After seeing your tips I am gonna have to try it out again.
The only problem I have with Firebug is that sometimes its panel fails to appear when I right click -> inspect element but it doesn’t happen too often.
)
Other than that it’s a wonderful tool.
Thanks for sharing, James (got your name from your website
Support Firebug by taking the Mozilla survey on Firebug,
http://hacks.mozilla.org/2010/03/quarterly-developer-survey-update/
Tell your friends…
love the bug!
I have to disagree …
By far the most important feature is to simply call the debugger after the opening curly brace … This way you can step through your code …
var add = function(a,b){
debugger;
return a + b;
};
var a = 1;
var b = 2;
console.log(add(a,b));
it’s really superb ….
thanks for share and firebug u really makes our life so easier i thanks u too.