Firefox: disable an extension that’s spamming devtools logs

I didn’t have a fox on hand, so here’s a lion.

Browser extensions can run JavaScript within the content of your tabs. This means they can trigger messages that appear in the devtools console. For example, one extension I use logs this warning on every tab:

InstallTrigger is deprecated and will be removed in the future.
commons.js:2:1452152

It gets worse when I’m working on a project with a strict CSP, where I also see errors like:

Content-Security-Policy: The page’s settings blocked an inline style (style-src-elem) from being applied because it violates the following directive: “default-src 'self' ... 'nonce-+cZs70M7low9+tMARHfYkA=='”
commons.js:2:2379131

I’d like to keep the console clear of such noise, so I can focus on any messages from the project I’m working on. Unfortunately, Firefox doesn’t provide much context for these messages. Fortunately, it does provide just enough, if you know where to look.

First, right click a message and click “Open URL in New Tab”:

Firefox devtools, right-clicking on a message and clicking “Open URL in New Tab”.

In my case, this opens a tab with the URL:

moz-extension://e130c67d-19df-4f53-8e5a-6cc3fb46b129/commons.js

The JavaScript from the extension is shown. For some extensions, that may contain a comment that lets you identify the extension. But for most, it will be a minified mess.

Second, copy the extension ID from the URL. That’s the part between moz-extension:// and the next /, like:

e130c67d-19df-4f53-8e5a-6cc3fb46b129

Third, open the extension debugging URL, about:debugging#/runtime/this-firefox. Copy-paste that URL, or visit the extension setings and click “Debug Add-ons” from the settings menu:

Firefox extension settings page, settings wheel menu, “Debug Add-ons”.

Fourth, search for the copied extension ID. This should find the extension in the list, like:

Firefox “Debug add-ons” page, with the “Evernote” extension highlighted after searching by ID.

Fifth, go to “Manage Your Extensions” and disable the extension with its toggle switch:

“Evernote” extension for Firefox, disabled with its toggle switch.

You could also remove the extension if you don’t need it any more.

Great, that’s it. You can now reload any pages that were spammed and carry on with less noise. Though you may need to repeat if you see any other spam!

Fin

It’s like I always say: care for your devtools and they will care for you,

—Adam


Read my book Boost Your Git DX to Git better.


Subscribe via RSS, Twitter, Mastodon, or email:

One summary email a week, no spam, I pinky promise.

Related posts:

Tags: