Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 1075880 of Temporary Installation in Firefox

  • Revision slug: Mozilla/Add-ons/WebExtensions/Temporary_Installation_in_Firefox
  • Revision title: Temporary Installation in Firefox
  • Revision id: 1075880
  • Created:
  • Creator: wbamberg
  • Is current revision? No
  • Comment

Revision Content

{{AddonSidebar}}

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.

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.

{{EmbedYouTube("sAM78GU4P34")}}

Updating a temporary add-on

If you install the add-on in this way, what happens when you update the add-on's files?

Before Firefox 48

  • If you change files that are loaded on demand, like content scripts or popups, then changes you make are picked up automatically, and you'll see them the next time the content script is loaded or the popup is shown.
  • If you change files that stay loaded the whole time, like background scripts, then you can pick up changes you've made by disabling and then re-enabling the add-on in the about:addons page.
  • If you change files that are only parsed at install time, like the manifest.json file, you'll need to restart Firefox, then load the add-on again.

Note that before Firefox 48, loading the add-on again by pressing "Load Temporary Add-on" without restarting Firefox does not work.

Firefox 48 onwards

From Firefox 48 onwards:

  • if you change files that are loaded on demand, like content scripts or popups, then changes you make are picked up automatically, and you'll see them the next time the content script is loaded or the popup is shown.
  • there's a better way to handle the other cases: click the "Reload" button next to the "Debug" button. This does what it says:

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.

Revision Source

<div>{{AddonSidebar}}</div>

<div class="summary">
<p>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 <a href="/en-US/docs/Mozilla/Add-ons/Bootstrapped_extensions">bootstrapped extensions</a> and <a href="/en-US/docs/Mozilla/Add-ons/SDK">Add-on SDK add-ons</a>.</p>

<p>Note that this is <em>not</em> 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 <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Publishing_your_WebExtension">Publishing your WebExtension</a>.</p>
</div>

<p>To install an add-on temporarily:</p>

<ul>
 <li>open Firefox</li>
 <li>enter "about:debugging" in the URL bar</li>
 <li>click "Load Temporary Add-on"</li>
 <li>open the add-on's directory and select any file inside the add-on.</li>
</ul>

<p>The add-on will be installed, and will stay installed until you restart Firefox.</p>

<p>{{EmbedYouTube("sAM78GU4P34")}}</p>

<h2 id="Updating_a_temporary_add-on">Updating a temporary add-on</h2>

<p>If you install the add-on in this way, what happens when you update the add-on's files?</p>

<h3 id="Before_Firefox_48">Before Firefox 48</h3>

<ul>
 <li>If you change files that are loaded on demand, like <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Content_scripts">content scripts</a> or <a href="/en-US/Add-ons/WebExtensions/Anatomy_of_a_WebExtension#Browser_actions_2">popups</a>, then changes you make are picked up automatically, and you'll see them the next time the content script is loaded or the popup is shown.</li>
 <li>If you change files that stay loaded the whole time, like <a href="/en-US/Add-ons/WebExtensions/Anatomy_of_a_WebExtension#Background_scripts">background scripts</a>, then you can pick up changes you've made by disabling and then re-enabling the add-on in the about:addons page.</li>
 <li>If you change files that are only parsed at install time, like the <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json">manifest.json</a> file, you'll need to restart Firefox, then load the add-on again.</li>
</ul>

<div class="note">
<p>Note that before Firefox 48, loading the add-on again by pressing "Load Temporary Add-on" without restarting Firefox <em>does not work</em>.</p>
</div>

<h3 id="Firefox_48_onwards">Firefox 48 onwards</h3>

<ul>
</ul>

<p>From Firefox 48 onwards:</p>

<ul>
 <li>if you change files that are loaded on demand, like <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Content_scripts">content scripts</a> or <a href="/en-US/Add-ons/WebExtensions/Anatomy_of_a_WebExtension#Browser_actions_2">popups</a>, then changes you make are picked up automatically, and you'll see them the next time the content script is loaded or the popup is shown.</li>
 <li>there's a better way to handle the other cases: click the "Reload" button next to the "Debug" button. This does what it says:
  <ul>
   <li>reloading any persistent scripts, such as <a href="/en-US/Add-ons/WebExtensions/Anatomy_of_a_WebExtension#Background_scripts">background scripts</a></li>
   <li>parsing the manifest.json file again, so changes to <code><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions">permissions</a></code>, <code><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts">content_scripts</a></code>, <code><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/browser_action">browser_action</a></code> or any other keys will take effect.</li>
  </ul>
 </li>
</ul>

<div class="note">
<p>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.</p>
</div>
Revert to this revision