Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide messages in console that came from iframes

I am using console.log(...) for debugging purposes. However the console gets messages from iframes too(I am using iframes in my HTML code). How can I see only the logs that I sent and not the logs that came from iframes?

like image 427
rramakrishnaa Avatar asked Mar 02 '16 08:03

rramakrishnaa


People also ask

How do I hide iframe messages?

In Chrome's Console tab you have a Filter box, type there the name of the file you want to filer out, with a minus sign "-" before the file name. You can filter multiply files, using space as a delimiter. Or instead of typing, just right click on a log message, and select Hide message from <file_name> .

How do I hide iframes?

The hidden attribute hides the <iframe> element. You can specify either 'hidden' (without value) or 'hidden="hidden"'. Both are valid. A hidden <iframe> is not visible, but maintains its position on the page.

How do I view iframe console logs?

You can use Chrome DevTools. There is a Javascript Selector "Top" where you can select the source. The logs from that source will show up.


1 Answers

This is kinda old post, but still, for those who will come here for help:

In Chrome you can check the "Selected context only" (screenshot here) option, and it'll be this.

like image 115
gulpnerd Avatar answered Oct 12 '22 22:10

gulpnerd