I’ve created an add-on with a background script using this manifest:
{
"manifest_version": 2,
"name": "foo",
"version": "1.0",
"description": "foo",
"icons": {
"48": "icons/foo-48.png"
},
"applications": {
"gecko": {
"id": "foo@bar",
"strict_min_version": "71.0"
}
},
"browser_action": {
"default_icon": {
"48": "icons/foo-48.png"
},
"default_title": "Foo"
},
"commands": {
"run-nsaver": {
"suggested_key": {
"default": "Ctrl+Foo"
},
"description": "Foo"
}
},
"background": {
"scripts": ["foo.js"]
},
"permissions": ["tabs", "activeTab", "nativeMessaging"]
}
When I load the add-on, the icon shows in the toolbar, but that’s it. When I click on the Inspect button, Firefox says that “this page has no sources”. Also, the JS debugger (on any web page) doesn’t show my add-on at all.
How can I further debug this? Could there be a parse error in one of my add-on files, e.g., my JS files (not that I found any)?
Note that for various reasons, I’m using Private Browsing, but enabled the add-on for it. Could Private Browsing contribute to my problems?
(Also, do I remember correctly that console.log doesn’t work in extension/background script contexts?)