Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Google Chrome group identical console.log messages?

I've been looking everywhere trying to find a way to modify the behavior of the developer tools console logging in Google Chrome. I've come up short.

The console, by default, does not show each and every time logged. It appears to be keeping a tally of the number of times that the same message is sent to the log. This does not help when you are logging items to verify or debug workflow in a web application.

If I were to log:

1
2
1
1
2
3

I expect to see just that, but what you get is more like:

(3) 1
(2) 2
    3

Is there any way to change this behavior and force the console to show you each and every item that has been logged?

Thank you,

JDF

like image 843
JDF Avatar asked Apr 07 '11 17:04

JDF


People also ask

How do I clear my Chrome console history?

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.

Where are Chrome console logs stored?

Debug logs are stored in the user data directory as chrome_debug. log. The file is overwritten every time Chrome restarts. So, if you have an issue with the browser, check the log before you restart Chrome.

What is XHR in Chrome console?

XHR Breapoints allow you to break whenever a server request URL contains a particular value. Add an XHR breakpoint within the Sources tab. Click the + icon and enter a value to break on.


2 Answers

If you click on the cog on the top right of the console window, you are given the option to "Group similar", which is probably checked, if you un-check this, it will show each line separately.

example console with cog

like image 129
Rich S Avatar answered Oct 11 '22 16:10

Rich S


In your Devtools Console:

  1. press the combination CTRL+SHIFT+P.
  2. Write: "show timestamps"
  3. Select it!
  4. Done!

Each output to the console, will have its own line!

like image 23
colxi Avatar answered Oct 11 '22 18:10

colxi