I wrote a simple firefox extension: only one content script which has only one line of code: console.log(“hello world”); I was confident it was all right. Then, I typed “about:debugging” in the address bar of firefox, clicked “this firefox”, clicked “Load Temporary Add-on…”, selected the manifest.json file of the add-on. So good so far. I could see the add-on appears on the “about:debugging” tab. When I switched to the tab where the add-on was supposed to run and press F12, I could see the log message printed by the add-on. I could do some modification about the content script, then went to the “about:debugging” tab and clicked the “reload” button underneath the add-on, then went to the web page, and saw the effects by the modified add-on.
Things went smooth until I clicked the remove button underneath the add-on on the “about:debugging” tab, and clicked “Load Temporary Add-on…” to try to load it again. Suddenly, the add-on stopped working. I could not see any log message on the web page tab. I could not see any error on the “about:debugging” tab, or web page console, or browser console, or the console brought by clicking the Inspect button nearby the add-on on the “about:debugging” tab. Not any clue for the problem.
The mysterious problem was finally solved on the “about:addons” tab, where the “Run in Private Windows” was turned off for unknown reasons. After turning the option on, the add-on can be run without problem. This must be a bug of firefox because the first time I loaded the add-on, it ran without problem.