Log to Firebug Console from Firefox Extensions

This is a quick and short post, mainly for self documentation. If you are working on a Firefox extension and want to do “console.log()” to Firebug, you need to use this instead –

You can’t directly use console.log() because your code doesn’t execute from within a “window” instance. If you get “Firebug” is undefined or some similar error messages, make sure that Firebug is installed and working properly.

Firebug needs to be running when you try to log the strings.

Leave a Reply

Your email address will not be published. Required fields are marked *