Yes, you can use the command web-ext run
from the directory in which the extension exists. This will start Firefox with the WebExtension installed using a temporary profile. web-ext run
is intended for testing your WebExtension add-on during development, not for normal use of Firefox. By default, the web-ext run
command will watch your WebExtension's files and automatically reload the extension when any of the files are changed. You can disable this feature by using the --no-reload
option.
If you are using a Firefox version below 49, you will need to specify the --pre-install
option which uses a different method of installing the extension in the profile. However, if you use the --pre-install
, your WebExtension will not be operational if you are trying to use a release or beta version of Firefox and the extension is not signed. This basically means that using --pre-install
is not useful for Firefox versions below 49 unless you are using a Developer Edition build. Using --pre-install
can be useful for Developer Edition versions of Firefox above 49 if you are wanting to test how your extension behaves during Firefox startup. If you do not use the --pre-install
option, your extension is installed as a temporary extension and does not need to be signed to be tested in release versions of Firefox.
If you want to use a specific profile, then you need to specify the profile using the --firefox-profile
option. MDN says:
When using a custom profile, web-ext first copies the profile. The custom profile will not be altered.
Installing web-ext
You will need to install web-ext
. You can do so by following the instructions in Getting started with web-ext. The instructions are to, after you install node/npm, run the following command:
npm install --global web-ext
References