Is there any tool (preferably extension/add-on to any browser) that allows you to see all the value changes of the desired JS variable in real time?
Previously I did something like this (in pure JS):
var someVariable;
var previousValueOfSomeVariable;
var f = function() {
if (previousValueOfSomeVariable != someVariable) {
console.log(Date.now(), someVariable);
previousValueOfSomeVariable = someVariable;
}
}
var TO = setInterval(f, 100);
It did the trick, but was, of course, inefficient (in reality the function was bigger, while it required object-copy function if variable was an object and further checks)...
UPDATE
I'm aware of console tools, but I'd like to see the history of changes, like:
someVariable
0ms: undefined
;
10ms: 5
;
40ms: 'someothervalue'
;
150ms: null
etc.
(Milliseconds are given for example purposes, not necessarily required). Maybe it can be done within the DevTools console, but I don't know how.