Mute scripts in Chrome's developer tools console

杀马特。学长 韩版系。学妹 提交于 2019-12-23 17:37:06

问题


Is it possible to hide all console output from some scripts in Chrome's developer tools? Sometimes third-party libraries or APIs provide some information in console. That's OK, but can be very annoying when you want to debug your own code.

More simply, can I ask developer tools to hide console output from https://www.google-analytics.com/analytics.js (just dummy example). Or even better, to show only error level for this source?

Yes, there are some ways. I can add a string marker to text which allows me to filter my messages. I can play around overriding console instance... I wonder if there is such funtionality built in developer tools?


回答1:


Accidentally found a part of answer.

If you right-click on any message in console, there is Filter item in context menu. And you can hide there messages from exact source.

Still wonder if there is possibility to set logging level per source.



来源:https://stackoverflow.com/questions/45737141/mute-scripts-in-chromes-developer-tools-console

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!