Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make "Selected Context Only" persist in Chrome DevTools console settings

I get a ton of misc errors from misc Chrome Extensions in my console. If I go to settings and check "Selected Context Only" then they go away and everything is good.

If I ever close that tab, or open a fresh Chrome window, "Selected Context Only" is unchecked again.

Is it possible to get this setting persisted forever and ever?

like image 513
corysimmons Avatar asked Feb 21 '19 05:02

corysimmons


People also ask

What does preserve log do in Chrome?

Preserve log is a checkbox that lets you persist logs between page refreshes. This is useful when debugging website issues that require you to refresh the page, since all console output is otherwise cleared.

How do I clear a variable in chrome console?

Use the short cut Ctrl + L to clear the console. Use the clear log button on the top left corner of the chrome dev tools console to clear the console. On MacOS you can use Command + K button.

How do I save changes in DevTools?

To save your changes, press CTRL + S when editing the file.


Video Answer


2 Answers

Selecting the same option form settings (f1) worked for me

like image 34
llsanketll Avatar answered Oct 11 '22 22:10

llsanketll


You can use the filter option as a workaround. For example I was able to hide warnings like 'DevTools failed to load SourceMap: Could not load content for...' with regex -/failed\sto\sload\ssource\smap/

enter image description here

Also you can find a documentation for filtering here https://developers.google.com/web/tools/chrome-devtools/console/reference#filter

like image 105
Ed Kolosovsky Avatar answered Oct 11 '22 23:10

Ed Kolosovsky