This article describes how an add-on developer can temporarily install an add-on in Firefox for testing and debugging. The add-on will stay installed until you restart Firefox. You can use this method with any kind of restartless add-on, including bootstrapped extensions and Add-on SDK add-ons. As of Firefox 55, the add-on developer temporarily install will remain after closing of Firefox.
Note that this is not how end users should install add-ons in Firefox. End users will install add-ons by downloading and opening packaged add-ons that have been signed by Mozilla. To learn how a WebExtension developer can get such a packaged, signed add-on, see Publishing your WebExtension.
To install an add-on temporarily:
- open Firefox
- enter "about:debugging" in the URL bar
- click "Load Temporary Add-on"
- open the add-on's directory and select any file inside the add-on.
The add-on will be installed, and will stay installed until you restart Firefox.
Reloading a temporary add-on
Starting in Firefox 48, there's a new button labeled "Reload" next to the add-on's entry in about:debugging:
This does what it says:
- reloading any persistent scripts, such as background scripts
- parsing the manifest.json file again, so changes to
browser_actionor any other keys will take effect.
Note that in Firefox 48 only, "Reload" does not update the add-on's name and description that are displayed in about:debugging and about:addons. This is fixed in Firefox 49.
Using the command line
If you are already using the command line for development, check out the web-ext tool. It automates the temporary installation step and automatically reloads your extension when its source code changes.