Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome debugger - how to turn off console.log message grouping?

Say, in my Google Chrome extension I do this:

console.log(msg); 

and the Chrome debugger groups similar messages like so:

enter image description here

Is there any any to turn it off and have messages post just as they are?

like image 636
c00000fd Avatar asked Sep 07 '14 01:09

c00000fd


People also ask

How do I disable Chrome console warnings?

Click the Log Levels drop-down to enable or disable Verbose , Info , Warning or Error messages. opening the Console Sidebar and then clicking Errors, Warnings, Info, or Verbose.

How do I split my Chrome console?

Vertical split You can undock the developer tools (by clicking on the icon in the bottom-left corner), which moves it to a new window. Then press Esc to open the console. Both the window and the "small console" can be resized to meet your needs.

How do I clear the debug console in Chrome?

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 remove all console log in production?

if you don't have environment variable then you can jsut simply do. console. log = function () {}; I am using this on my live app to hides the console.


2 Answers

It only collapses consecutive rows that are identical, I don't see it as much of a problem, but with the settings button in the top right corner of the console you can enable 'Show timestamps' which will put them on different lines:

enter image description here

You can see they only collapse consecutive duplicates with this:

msgs = ['hello', 'world', 'there']; for (i = 0; i < 20; i++) console.log(msgs[Math.floor((i/3)%3)])  

The console api has a lot of other functions that might help you follow your code. For instance console.count(label) logs label with a count of how many times it's been logged, console.group() lets you group other logging calls together and console.timeline(label) lets you group logs into a timeline.

like image 165
Jason Goemaat Avatar answered Sep 17 '22 22:09

Jason Goemaat


Someone had the same problem there: Google Chrome developer tools console logging… almost useless? with no answer to disable this feature.

As a workaround, you can enable Show timestamps for the console in the developer tool settings.

like image 28
Volune Avatar answered Sep 19 '22 22:09

Volune