Reputation: 35843
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
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.
Upvotes: 0
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.
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
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.
Upvotes: 1
Reputation: 423
In DevTools (F12) -> Settings (F1) :
Disable both "enable JS source maps" and "enable CSS source maps" in "Preferences -> Sources"
Upvotes: 13
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.
Upvotes: 7
Reputation: 73526
Hide them via console filter like -/(load|parse)\sSourceMap/
(using a /regexp/ with \s seems to be the only working method of specifying strings with spaces)
Upvotes: 27