As the8472 has mentioned, you can test Add-on SDK extensions without the need to restart the browser using jpm
by using jpm watchpost
. Using this appears to take a bit of configuring. I have not used this, as I would find having the add-on automatically updated upon every write to a file a bit annoying. I often change multiple files, or make multiple writes to the same file between the times I run the add-on to test. Basically, I want to maintain more control as to when the add-on is reloaded than to have it automatically done each time a file is changed.
There is a way to load temporary add-ons which works for both unpacked add-ons and .xpi files. The problem is that prior to running jpm
, your add-on is not actually a complete Firefox add-on. jpm
adds wrappers around the contents of your add-on to make it a normal bootstrapped add-on. Without those wrappers, your add-on will not function. One possibility would be to run jpm xpi
each time you want to test a new version: Once you have initially loaded the add-on as a temporary add-on, you would run jpm xpi
, then click on the "Reload" button for your add-on in about:debugging
.
[This method will have issues which you will need to work through]: Alternately, you could unpack the .xpi file and continue your development from the files contained in the resulting directories while using the temporary add-on method of installing your add-on (click on any file in the directory where you unpacked the files to install as a temporary add-on). However, this method may prevent you from using jpm
at all with your add-on. In addition, jpm
performs somewhat different actions when packaging your add-on into an .xpi file depending on the contents of your add-on. If so, things may start to break if you significantly change your add-on's functionality (e.g. changes in package.json won't propagate to install.rdf). With this method, you would, probably, need to use a "normal", non-jpm
method of creating an .xpi file when you want to publish your add-on.