Tips for new Mozilla extension developers

Disabling XUL Cache
The nglayout.debug.disable_xul_cache preference is very useful for extension developers. By default this is false, which means, Mozilla caches the XUL, chrome, and associated Javascript, etc for performance. So, for testing any change made to the extension can be seen only after restarting Mozilla. This is a pain if you’re developing an extension. So, set this to true, although it might be a bit less performant (this is hardly noticeable), it helps. To set this, type about:config in the URL bar, and create a new boolean value with nglayout.debug.disable_xul_cache as the name, and true as the value.
Managing your extension without creating JARs
One of the improvements of the new Firefox, Thunderbird 1.5+ releases is the new extension manager. You do not need to create zippies for testing your extension. Just create a file named <your-extension-uuid> under Firefox/Thunderbird profile directory/extensions that contains the path to your extension. Its that simple! Assuming the UUID of your extension is A-B-C-D and your profile directory is $HOME/.mozilla/firefox/XYZ and your extension (development) directory is $HOME/Projects/Mozilla/foo, you need to create a text file named $HOME/.mozilla/firefox/XYZ/extensions/{A-B-C-D} with the content $HOME/Projects/Mozilla/foo.

Leave a Reply