Chrome Developer Tools console is a log stack, how can I view re-recorded materials [Screenshot inside]?

I just started using the console in Chrome Developer Tools (quite new for Javascript in general). I noticed that when I sequentially write the same variable twice (an object in this case), this log stacks this and places an icon next to it next to it. I click on this thinking that I can see the object twice (since it was updated twice), but nothing happens.

Image for clarification:

enter image description here

As you can see there is a small “2” in the blue circle next to the drop-down list Object. The first magazine would be Object.numat 3, and the second at 4, but all I see is the second.

Any answers to the question of how to view both logs would be appreciated.

:.)

+5
4

log " " , "num" , log.

, " ". console.log ( , ).

, , , Chrome.

function log(obj) {
    console.groupCollapsed(({}).toString.call(obj).split(' ')[1].split(']')[0]);
    for (var k in obj) obj.hasOwnProperty(k) && console.log(k + ': ', obj[k]);
    console.log('__proto__: ', obj.__proto__);
    console.groupEnd();
}​

.


, . , .:)

+1

, . , "num", 4, , , - , . , .

, , , - -

console.log(JSON.parse(JSON.stringify(obj)));

( , .) , JSON.parse JSON .

debugger; - , JS, script. , .

+6

This has happened to me before. The only solution I could find was to output something between the two output calls. For example, if you have this:

console.log(var);
...
console.log(var);

do it:

console.log(var);
console.log('asdf');
...
console.log(var);
+1
source

According to the documentation , message stacking can be disabled by enabling timestamps in the general console settings:

enter image description here

+1
source

All Articles