# Introduction to Add-on Development

**URL:** <https://discourse.mozilla.org/t/introduction-to-add-on-development/608>\
**Category:** Development\
**Created:** [July 11, 2014, 9:00pm UTC](https://discourse.mozilla.org/t/introduction-to-add-on-development/608 "2014-07-11T21:00:34Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![jorgev](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@jorgev](https://discourse.mozilla.org/u/jorgev)\
**Post date:** [August 13, 2016, 12:00am UTC](https://discourse.mozilla.org/t/introduction-to-add-on-development/608/31 "2016-08-13T00:00:00Z")

</div>

There isn’t a walkthrough for JPM, but you can use [this method to test your restartless add-ons in Firefox](https://blog.mozilla.org/addons/2015/12/23/loading-temporary-add-ons/). Even better, you can also move to the [WebExtensions API](https://developer.mozilla.org/en-US/Add-ons/WebExtensions).

There are other ways to run unsigned add-ons, which are [listed on this page](https://wiki.mozilla.org/Addons/Extension_Signing). I don’t know if there’s a way to make `jpm run` work with them.

---

<div class="post-metadata">

**Author:** ![tim.cooke](https://avatars.discourse-cdn.com/v4/letter/t/45deac/32.png) [@tim.cooke](https://discourse.mozilla.org/u/tim.cooke)\
**Post date:** [August 13, 2016, 5:30am UTC](https://discourse.mozilla.org/t/introduction-to-add-on-development/608/32 "2016-08-13T05:30:29Z")

</div>

Thank you Jorgev; I will investigate those options. As side notes:

- I’m creating a side-bar add-on, so I’m pretty sure I can’t use the WebExtensions API, at least yet (please let me know if I’m wrong).

- I’ve tried some of the techniques such as setting xpinstall.signatures.required to false, but since I’m using 48, I don’t think that specific technique will work.

---

<div class="post-metadata">

**Author:** ![jorgev](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@jorgev](https://discourse.mozilla.org/u/jorgev)\
**Post date:** [August 16, 2016, 11:04pm UTC](https://discourse.mozilla.org/t/introduction-to-add-on-development/608/33 "2016-08-16T23:04:50Z")

</div>

> [@tim.cooke](#):
>
> I’m creating a side-bar add-on, so I’m pretty sure I can’t use the WebExtensions API, at least yet (please let me know if I’m wrong).

That’s correct. There’s [a bug filed](https://bugzilla.mozilla.org/show_bug.cgi?id=1208596) for it, but no real progress so far.

> [@tim.cooke](#):
>
> I’ve tried some of the techniques such as setting xpinstall.signatures.required to false, but since I’m using 48, I don’t think that specific technique will work.

You would need to use the unbranded builds, also explained in the wiki. It’s best/easiest to do your testing in Developer Edition, though.

---

<div class="post-metadata">

**Author:** ![TheOne](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/theone/32/49872_2.png) [@TheOne](https://discourse.mozilla.org/u/TheOne)\
**Post date:** [January 16, 2017, 3:49pm UTC](https://discourse.mozilla.org/t/introduction-to-add-on-development/608/36 "2017-01-16T15:49:21Z")

</div>

2 posts were split to a new topic: [Issue “format not supported”](https://discourse.mozilla.org/t/issue-format-not-supported/13043)

---

<div class="post-metadata">

**Author:** ![user123](https://avatars.discourse-cdn.com/v4/letter/u/ed655f/32.png) [@user123](https://discourse.mozilla.org/u/user123)\
**Post date:** [May 8, 2017, 11:24am UTC](https://discourse.mozilla.org/t/introduction-to-add-on-development/608/38 "2017-05-08T11:24:11Z")

</div>

Thanks for the post. I am looking for a good tutorial on reading input from HTML panel, store and retrieve the input. e.g. user entered list in the script. What are the possible ways to do this?

---

<div class="post-metadata">

**Author:** ![musiquegraeme](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/musiquegraeme/32/4774_2.png) [@musiquegraeme](https://discourse.mozilla.org/u/musiquegraeme)\
**Post date:** [November 6, 2017, 3:37pm UTC](https://discourse.mozilla.org/t/introduction-to-add-on-development/608/39 "2017-11-06T15:37:28Z")

</div>

I joined the tb-mailing list but that seems to have died now and maildev digest has taken it’s place but there seems to be no more help for tb developers. I read just recently that legacy non bootstrapped extensions are not to be supported so I looked around and there is NO help that I can see that is accessible to upgrade a legacy non bootstrapped extension to a restartless one. I would really love to see one basic example of each type… one on changing the main display and one on changing the messaging display. I looked through a stack of addons and MOST are not restartless. It seems that addons are really not supported any more.  
Blessings

---

<div class="post-metadata">

**Author:** ![jorgev](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@jorgev](https://discourse.mozilla.org/u/jorgev)\
**Post date:** [November 29, 2017, 11:26pm UTC](https://discourse.mozilla.org/t/introduction-to-add-on-development/608/40 "2017-11-29T23:26:47Z")

</div>

A post was split to a new topic: [Allow an extension to configure Firefox security devices](https://discourse.mozilla.org/t/allow-an-extension-to-configure-firefox-security-devices/22722)

---

<div class="post-metadata">

**Author:** ![TheOne](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/theone/32/49872_2.png) [@TheOne](https://discourse.mozilla.org/u/TheOne)\
**Post date:** [January 6, 2018, 1:00pm UTC](https://discourse.mozilla.org/t/introduction-to-add-on-development/608/41 "2018-01-06T13:00:25Z")

</div>

A post was split to a new topic: [Add-on corrupt error message](https://discourse.mozilla.org/t/add-on-corrupt-error-message/24158)

---

<div class="post-metadata">

**Author:** ![TheOne](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/theone/32/49872_2.png) [@TheOne](https://discourse.mozilla.org/u/TheOne)\
**Post date:** [July 10, 2018, 11:45am UTC](https://discourse.mozilla.org/t/introduction-to-add-on-development/608/43 "2018-07-10T11:45:41Z")

</div>

A post was split to a new topic: [Using imports](https://discourse.mozilla.org/t/using-imports/30021)

---

<div class="post-metadata">

**Author:** ![daviddev](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@daviddev](https://discourse.mozilla.org/u/daviddev)\
**Post date:** [December 18, 2018, 10:48pm UTC](https://discourse.mozilla.org/t/introduction-to-add-on-development/608/44 "2018-12-18T22:48:52Z")

</div>

I would like to develop a Firefox addon to provide a much better password manager than the existing ones. The problem is that the fundamentals of Webextensions are not all provided in one place, concisely.

When I try to follow the documentation, I get errors like “TypeError: can’t access dead object” and “DebuggeeWouldRun”. All these errors are obscure, poorly documented, and have source file locations in utility programs instead of in my extension code. More importantly, I can find no postings that teach what to do and what not to do, except for a few very obscure cases that do not appear relevant to what I’m trying to do.

It has been a very frustrating few days, and I feel that I still cannot get the basic functions to work: sending a message from background to foreground, or vice-versa, and so forth.

And I have not yet discovered a forum where I can get help in finding my bugs, bugs that I could have avoided easily if the documentation were complete. I’m not criticizing any person, but the idea of documenting fully any system or feature, in this case Webextensions.

I’ve been referred here, and I’m hoping to find answers to my many questions.

Can anyone give me advice as to how to proceed? Should I post my buggy code in one of these forums? Should I post tiny test cases that malfunction? Is there a wonderful document somewhere that I should read?

---

<div class="post-metadata">

**Author:** ![jorgev](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@jorgev](https://discourse.mozilla.org/u/jorgev)\
**Post date:** [December 18, 2018, 11:32pm UTC](https://discourse.mozilla.org/t/introduction-to-add-on-development/608/45 "2018-12-18T23:32:43Z")

</div>

The main place for documentation is [MDN](https://developer.mozilla.org/en-US/Add-ons/WebExtensions), but you’ve probably seen that already.

You can create new threads for the individual issues you’ve run into, in this forum. The community is generally very helpful.

---

<div class="post-metadata">

**Author:** ![juraj.masiar](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/juraj.masiar/32/30587_2.png) [@juraj.masiar](https://discourse.mozilla.org/u/juraj.masiar)\
**Post date:** [December 19, 2018, 7:30am UTC](https://discourse.mozilla.org/t/introduction-to-add-on-development/608/46 "2018-12-19T07:30:48Z")

</div>

I can tell you from my own experience that reading a lot of MDN is the best way to learn about web-extension / JavaScript development and to avoid errors. Every time you want to use some API, read the MDN first. It’s well written and updated (I’ve never seen such a perfect documentation).  
Try to read as much as possible, not just [Anatomy of an extension](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Anatomy_of_a_WebExtension).

---

<div class="post-metadata">

**Author:** ![daviddev](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@daviddev](https://discourse.mozilla.org/u/daviddev)\
**Post date:** [December 19, 2018, 2:00pm UTC](https://discourse.mozilla.org/t/introduction-to-add-on-development/608/47 "2018-12-19T14:00:32Z")

</div>

> [@juraj.masiar](#):
>
> Try to read as much as possible, not just [Anatomy of an extension](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Anatomy_of_a_WebExtension).

Thank you, it is good advice and this is indeed my primary source of information. But it is not complete. Using code similar to MDN generates various errors, not usually in the part that MDN explains, but in the parts concerning which it is silent.

For example, I get frequent “dead object” errors. These are apparently caused by a Firefox mechanism to ensure that there are no memory leaks in extensions/addons. But I am not saving window, document, or any other DOM nodes in a global variable, so in this case as in many others, the documentation is not sufficient to write correct code. I have been experimenting for days and still have not found what I am doing wrong.

I feel sure that when I get help and find my current bugs I will be in a better position to read and experiment to solve my future bugs. But right now I have a very big learning hurdle, and the forums are very slow to help because there are so few people who really understand this stuff.

---

<div class="post-metadata">

**Author:** ![Tensmoor](https://avatars.discourse-cdn.com/v4/letter/t/a9a28c/32.png) [@Tensmoor](https://discourse.mozilla.org/u/Tensmoor)\
**Post date:** [June 15, 2019, 7:17am UTC](https://discourse.mozilla.org/t/introduction-to-add-on-development/608/49 "2019-06-15T07:17:48Z")

</div>

I have to agree with those who have said that a lot of the documentation for the current system of add-on development is disjointed and incomplete which is in complete contrast to the documentation for basic javascript and html.

For the past few years I’ve been trying to teach myself how to create browser extensions and even managed to make one and have it published (it’s a basic repurpose/edit of various examples). Now however I’m working on one from scratch that I want to be available in both desktop and android versions of Firefox and have so far failed completely to find a way of being able to test it in the android version.

I’ve got a fully working desktop version and am happy with how it works on that but when I tried to follow the [Developing extensions for Firefox for Android](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Developing_WebExtensions_for_Firefox_for_Android) guide I ran into a majoe roadblock.

I’ve got Node.js and web-ext set up without a problem and even got Android Studio installed but when I try to install Firefox for Android I run into the problem of not being able to find a way to run the Android Emulator so I can install the Android version of Firefox in it.

One of the reasons I chose Firefox to develop in was the excellent documentation for desktop sites and the support for add-ons in the android version. If anyone can point me to a simple, clear and current tutorial on how I can test android versions of add-ons I’d be very grateful. Please note I’m a completely self taught programmer in my 60s (it helps keep my remaining braincell working) so don’t expect earth-shattering stuff 😉

---

<div class="post-metadata">

**Author:** ![daviddev](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@daviddev](https://discourse.mozilla.org/u/daviddev)\
**Post date:** [June 15, 2019, 10:18am UTC](https://discourse.mozilla.org/t/introduction-to-add-on-development/608/50 "2019-06-15T10:18:33Z")

</div>

Tensmoor, I agree with your assessment of the incomplete documentation, although I am unfamiliar with the Android part. For that problem, you might try installing BlueStacks ([www.bluestacks.com](http://www.bluestacks.com)), a nice standard Android emulator. I have no idea whether Firefox Webextensions works with it, though. Best of luck.

I am 73 and I keep busy with my computer, too. I worked on a Webextensions project to create a unique kind of password manager, and I got used to asynchronous programming using Promises, but the asynchronous communication system and other basics of Webextensions are in my opinion poorly designed and hard to debug and I had to abandon my project or else lose my mind with frustration. I really don’t have much approval for the work of the Webextensions designers. I like to design my systems software cleanly and usably and document fully. I can’t recall that I ever received a single bug report on my released software during my 40 year career. Such success in creating reliable software is possible. But it requires accepting all sorts of odd inputs without breaking, and that requires skill in unit testing and fixing bugs before continuing with coding.

---

<div class="post-metadata">

**Author:** ![usmanmalikgfx](https://avatars.discourse-cdn.com/v4/letter/u/f17d59/32.png) [@usmanmalikgfx](https://discourse.mozilla.org/u/usmanmalikgfx)\
**Post date:** [March 2, 2020, 10:44am UTC](https://discourse.mozilla.org/t/introduction-to-add-on-development/608/56 "2020-03-02T10:44:26Z")

</div>

That tutorials about How to develop a Firefox extension is so helpful.

---

<div class="post-metadata">

**Author:** ![deroen](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@deroen](https://discourse.mozilla.org/u/deroen)\
**Post date:** [April 10, 2020, 5:27pm UTC](https://discourse.mozilla.org/t/introduction-to-add-on-development/608/57 "2020-04-10T17:27:56Z")

</div>

finaly i found a good tutorial: [https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your\_first\_WebExtension](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension)

---

<div class="post-metadata">

**Author:** ![inspector71](https://avatars.discourse-cdn.com/v4/letter/i/3be4f8/32.png) [@inspector71](https://discourse.mozilla.org/u/inspector71)\
**Post date:** [February 24, 2021, 6:52am UTC](https://discourse.mozilla.org/t/introduction-to-add-on-development/608/60 "2021-02-24T06:52:45Z")

</div>

This post and thread is worse than useless: it is misleading. If this is still a valid place for extension developers to discuss developing then perhaps this thread could be replaced or deleted? 2014 is a generation ago, after all.

---

<div class="post-metadata">

**Author:** ![caitlin](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/caitlin/32/6091_2.png) [@caitlin](https://discourse.mozilla.org/u/caitlin)\
**Post date:** [February 24, 2021, 11:08pm UTC](https://discourse.mozilla.org/t/introduction-to-add-on-development/608/61 "2021-02-24T23:08:42Z")

</div>



---

<div class="post-metadata">

**Author:** ![caitlin](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/caitlin/32/6091_2.png) [@caitlin](https://discourse.mozilla.org/u/caitlin)\
**Post date:** [February 24, 2021, 11:15pm UTC](https://discourse.mozilla.org/t/introduction-to-add-on-development/608/62 "2021-02-24T23:15:57Z")

</div>

Thanks for the nudge; I’m archiving this thread in favor of a [new, up-to-date post](https://discourse.mozilla.org/t/get-started-with-firefox-extension-development/76051). 😉

[Previous page](https://discourse.mozilla.org/t/introduction-to-add-on-development/608.md?page=1)

[Next page](https://discourse.mozilla.org/t/introduction-to-add-on-development/608.md?page=3)
