Can't find console output for add-on loaded with "Load Temporary Add-on"

I’m working on a simple add-on but my keyboard shortcut “commands” don’t seem to be running. I’m having a hard time debugging it because I can’t locate my script’s console output or find my script in my devtools debug sources.

I’m using a content script, so according to Debugging content scripts (Extension Workshop) I should see my console output in the regular console for the page where my script is injected.

I’ve also checked the extension-specific debugging interface (by clicking “Inspect” from the about:debugging -> This Firefox page) but I don’t see my logs or sources there either.

I’m loading my add-on using about:debugging -> This Firefox -> Load Temporary Add-on.

Here’s my manifest.json:

And the extension:

My extension does seem to be loading because I see the red border around the page.

Any ideas what I’m missing here?

Can you zip your add-on and upload it?
7th icon from the left (arrow up) when you click Reply

I’m getting an error that “new users cannot upload attachments”, sorry :frowning:

My source code is all here:

You can clone the repo with git or use the “Download ZIP” feature:

You’re calling browser.commands.onCommand.addListener() from a content script.
The content script crashes (?) when it reaches this line, so console.log() isn’t executed.
If you put browser.commands.onCommand.addListener() in a background script, it works.

1 Like

Aaaaah! Got it, thank you! Looks like I need a new architecture…