Development Blog

Make link files in Firefox 4.0 read-only, use -purgecaches

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 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:

  1. Insure that your dev version always has a newer version,
  2. Change your install.rdf to add <em:unpack>true</em:unpack>,
  3. Make your file-proxy file read-only.
  4. update: Set the pref extensions.update.autoUpdateDefault to false

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.


One Response to “Make link files in Firefox 4.0 read-only, use -purgecaches”

  1. Jan Honza Odvarko Says:

    What was the reason to not declare #3 the winner?