g.pickardou
g.pickardou

Reputation: 35843

How to suppress Chrome DevTools warning: 'DevTools failed to load SourceMap: Could not load content for...'

Context

For many of my js files I have no source map. When using the devtools console it pollutes the warnings about that. I would not like to turn of all warnings, but those are not really useful for me

Question

How to suppress Chrome DevTools warning: 'DevTools failed to load SourceMap: Could not load content for...'?

Upvotes: 28

Views: 43469

Answers (5)

PieterT2000
PieterT2000

Reputation: 389

Often, these messages are caused by other contexts, such as extensions or workers. You can make the console only show those messages, that originated from the selected context (e.g. top).

Console tab -> Settings icon (top right) -> Make sure Selected context only is selected.

Console setttings

Upvotes: 0

Tmh
Tmh

Reputation: 1511

This solution is only if you don't want to use that particular extension (which is causing the issue) on your site or to remove the addon from your browser.

  • Goto the console. enter image description here

Click on the link that is printedn in the console log. the link starts with "chrome-extension", it will take you to the extension's page, you can find the name in the address bar

Screenshot of chrome extension

Go to the extensions( Chrome menu > More tools > Extensions ). You can either remove it from the browser or restrict the access by changing the site access to On click choosing from the options of the extension as below.

enter image description here

Upvotes: 1

Mike
Mike

Reputation: 423

In DevTools (F12) -> Settings (F1) :

Disable both "enable JS source maps" and "enable CSS source maps" in "Preferences -> Sources"

Upvotes: 13

RustyNox
RustyNox

Reputation: 469

If you open DevTools (F12) then look for the cog "Preferences" top/right you can disable "Enable JavaScript source maps" under the Sources section by un-checking that option.

Find the cog (preferences) Find the option

Upvotes: 7

woxxom
woxxom

Reputation: 73526

Hide them via console filter like -/(load|parse)\sSourceMap/

enter image description here

(using a /regexp/ with \s seems to be the only working method of specifying strings with spaces)

Upvotes: 27

Related Questions