Why I can't see the content script when I debug the addon?

Most probably because it’s not loaded :slight_smile:.
If you can, please provide your code, or at least part of your manifest file where you are loading content scripts.
Also make sure to read documentation:


To test your content script without debugger, try to put inside some code that modifies page, like document.body.style.background = 'yellow';. But for this code you need to make sure it’s executed after DOM is loaded (see “run_at” option).

Thanks for your answering.
I’m sure that the content script has been loaded, because it prints to the log on console.
but I still can’t find my extension on Debug tab.


I even can click the “on_content_end.js” file and debug it…
I only use this way, to locate the js file that i want to debug.

Are you using the right console window?
There are multiple - from “aboud:debugging” page you can debug background script of your addon (this console however shows log messages from other contexts as well).

To debug your content script use WebConsole - on the web-site press F12 or Ctrl + Shift + Z.

No, it absolutly is WebConsole.
I can see the addon scripts from “about:debugging”, but I can’t see the content script when I visit webConsole. :joy:
I can only print the log to the WebConsole, then I can click the js file name and locate the js file that I need debug.
it’s very strange.

That is strange! But I’m not surprised… debugging in Firefox is “not optimal”.

You know, when things stops making sense, it’s time to restart your browser, or whole PC. That often helps with these random issues.

All right, since I updated the 70, All of things have changed.
Anyway,Thanks for your answering, You’re really nice! :blush:

1 Like

Wait, 70 what? This Tuesday 72 was released, make sure to upgrade :slight_smile:.
Also as a developer you may want to use 73 Developer Edition.

That approach doesn’t work any more. There is no more “Browser Content Toolbox”. See

But there was a sekret cheat code to get around that:

devtools.context-switching.enabled

Except that got backed out because it broke something. Then it went back in at Firefox 77. I think. I’m using 79-0b9, so it ought to be working. Maybe. Trying to find out where that feature is hidden now.

Found the next sekret key:

Beginning with Firefox 62, the icon to open Developer Tools settings has been moved into a menu accessed by clicking/touching … (the elipsis) on the right of the tab.

Of course, they don’t tell you which tab.

OK. Got the debugger to run on a content script. Breakpoints work. But there’s no stack info tab any more

. I can step through the code, but the source code window doesn’t scroll. No idea where control is. Menu does not match documentation.

Hi, John. Thank you for your RFC896! (Hah, I’m not guessing, that screenshot is enough.)

Anyway, in 111 I can only debug content_scripts if I do F12 (devtools), then F1 (settings), then “Enable browser chrome and add-on debugging toolboxes” = yes. For some reason I can’t get any manifest v3 extensions, but v2 show up.

Enable browser chrome and add-on debugging toolboxes