This post is for folks who work on Firefox 4.0 extensions.
In trying to track down some Firefox 4.0 issues today I discovered that my Firebug copy had been overwritten by Firefox. Ouch.
To develop Firebug we use a ‘file-link’ , ‘file-proxy’ or ‘symlink’ feature of the Mozilla platform. We create a file in our profiles’s
extensions/ folder called
firstname.lastname@example.org and in that file we put the file system path to our development directory. Firefox reads this like it was an installed extension. Then when we change Firebug source, we just kill and restart Firefox to test and debug.
In Firefox 4.0 these file-proxies can be silently overwritten. Three ways I know that can be avoided:
- Insure that your dev version always has a newer version,
- Change your
- Make your file-proxy file read-only.
- update: Set the pref
The first option means you can’t go back and check any older version’s behavior. The second one means that you have to have a different
install.rdf for dev and release.
So I guess it’s #3. Update: Thanks to hints by Blair McBride and Colby Russell, option #4 is the winner. I set this in Chromebug’s defaults files so it will always be on.
And just in case you missed it: you also have to add the command line option
-purgecaches to get any extension changes to be picked up.