If you’re interested in working with Firebug, I would check out their information and documentation. You can find it easily in the add-ons page at mozilla, it’s still one of the top web development downloads.
If you’re interested in building your own add-on, go to the add-ons page and look for whitepapers and stuff like that. There are tons of open source projects out there which you can download the source code to see how it works. I’m sure Mozilla also has some documentation and there are blogs, articles, and entire books on the subject. Start at Mozilla’s site and go from there.