I have a Firefox extension. When I change the source code, every time I have to create the zip file including the source code and then make it as a .xpi file. Can I avoid this making *.xpi
file steps?

- 31,849
- 12
- 86
- 121

- 43
- 11
2 Answers
For all types of Firefox extensions you can test your extension without the need to create an .xpi file for each iteration.
WebExtensions
WebExtensions can be directly loaded as a temporary extension from the directory containing the manifest.json file. This is done from
about:debugging
.You can use
web-ext run
to test your extension in a temporary profile.They can be installed as an unpacked extension (all files not in a .xpi file). In addition, you can use a Firefox extension proxy file to have your extension files located in any directory you choose, not just under the profile's extensions directory.
Add-on SDK extensions
- You can use
jpm run
to test your extension without directly dealing with the .xpi file. - Add-on SDK extensions can not be loaded as temporary extensions without first explicitly creating the .xpi file with
jpm xpi
. However, as an .xpi, they can be loaded as temporary extensions. - Add-on SDK extensions can not directly be loaded as unpacked extensions. You would need to package the extension first using
jpn xpi
, then manually unpacking the extension.
Bootstrap/Restartless extensions
Bootstrap/Restartless extensions can be directly loaded as a temporary extension from the directory containing the chrome.manifest and install.rdf files. This is done from
about:debugging
.They can be installed as an unpacked extension (all files not in a .xpi file). In addition, you can use a Firefox extension proxy file to have your extension files located in any directory you choose, not just under the profile's extensions directory.
Overlay/Legacy/XUL based extensions
Overlay/Legacy/XUL based extensions can not be loaded as a temporary extension.
They can be installed as an unpacked extension (all files not in a .xpi file). In addition, you can use a Firefox extension proxy file to have your extension files located in any directory you choose, not just under the profile's extensions directory.
Additional information
I would suggest you read Installing add-ons for development and Installing a Temporary Add-on which cover these issues in more detail.
-
Yes. [Web-ext-run](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Getting_started_with_web-ext) worked for me! – lasantha dharmasiri Nov 17 '18 at 10:00
With WebExtensions, you don't need to create the .xpi file. You can directly go to about:debugging
in the address bar and load your temporary add-on file. You can also click on debug
to debug your webExtension. Have a look at this for more information on loading your first firefox add-on.

- 2,093
- 1
- 15
- 21