My (temporary) add on does not seem to trigger

You’ve probably heard this a thousand times, but here it is: I’ve tried to debug a simple extension with this manifest:

{
  "manifest_version": 3,
  "name": "CERES URL Generator",
  "version": "1.0",
  "description": "Generates CERES URLs from museum artifact pages",
  "permissions": ["activeTab", "scripting"],
  "content_scripts": [
    {
      "matches": ["*://ceres.mcu.es/*"],
      "js": ["content.js"]
    }
  ]
}

I load it in this page and it does not seem to trigger; the initial console.log does not show up. I’ve tried the “Inspect” page (which does not seem to be the thing), and the debugging page. There must be something wrong with the URL, but I simply can´t imagine what.

I have a feeling console logging is sometimes broken in content scripts in Firefox.
Especially errors used to be completely not visible.
Quick solutions I can think of:

  • load extension in Chrome :upside_down_face:
  • use debugger statement instead of console log
  • check all consoles, especially the background script one that opens from about:debugging#/runtime/this-firefox page, that one should display all logs
  • check also Browser Console - Ctrl + Shift + J

And just in case, verify that your addon has the host permissions:

1 Like