64

Is there a way to prevent extensions from showing up in the console of the developer tools window? It's annoying to be looking for JavaScript errors and have to ignore errors that are always there. I know from this question you can use Incognito mode, but I don't want to have to develop in a separate browser window with all of the shortcomings of Incognito mode.

If there isn't a good answer to this, how do I run down the offending extension, short of turning them off one at a time?

Tom
  • 885

7 Answers7

86

I know that this is an old question, but coming here today I found a new solution and decided to add my two cents.

In the Chrome console there is a gear option on the far right. Clicking on it will reveal a few options.

Make sure that you are showing only logs from top, and that Selected context only is selected.

This will hide all errors from extensions.

screenshot

robinCTS
  • 4,407
16

In case the error is coming from a chrome extension you don't want to disable, there's now a feature to filter messages from specific extensions or scripts. Find the console message, right click on it, go to Filter > Hide Messages from ______. The effect seems to persist for as long as you have that tab open.

chrome console filtering messages

tobek
  • 286
  • 2
  • 4
16

I realize this is an older question, but there is a better way than systematically disabling all your extensions to find out which one is throwing an error.

Hover the mouse pointer over the file name for the error in the console. You'll see a long string of gobbledygook. Part of that is an id that is unique for each extension. Take a moment and memorize the first few characters, in the image below they are pmejh:

screenshot of extension error in Chrome dev tools

Then go to your installed extensions at chrome://extensions and hover over each details link looking for a URL in the bottom left of the window that contains the characters you memorized.

enter image description here

SavoryBytes
  • 516
  • 1
  • 4
  • 10
3

Here is the way to identify the breaking extension directly. Nonetheless, this is not really the answer to the question. Well - the only way for now seems to be to disable the extension.

Three steps to identify broken extension

Best, Benedikt

1

Found this page that explains to turn on the "Add content scripts to ignore list" checkmark in the Dev Tools ⚙ Settings > Ignore List.

https://developer.chrome.com/docs/devtools/javascript/ignore-chrome-extension-scripts/

Moss
  • 699
1

For anyone still landing at this question:

Simply add -url:chrome-extension to the Filter field on top of the console:

Short Screen recording showing adding this filter Learned here: https://stackoverflow.com/a/60729232/1322169


Note:
You can also filter out extension urls in the Network tab too, by ticking ☑️Hide extension URLs:

Screenshot of Network tab

Bloke
  • 1,124
0

Never did find an answer, but I did find the problem by shutting off each extension until I found the culprit.

Tom
  • 885