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

Viewed 29191

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...'?

4 Answers

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)

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

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

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

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

Related