Search *values* of scope variables in Chrome debugger? -
if set breakpoint in app , nail in chrome devtools, there way search specific value? have huge object , variable i'm looking isn't expect it. perhaps there should property string of "foobar". expect in this.attributes.name it's not there. there way find without clicking through every single value in dom?
when app hits breakpoint, can run loop within object.
for example, if object is:
var attributes = {a: 1, b: 2, c: 3, d: 4, e: 5}; and wish find out 1 of them has value of 3, can run loop in javascript console within chrome devtools similar like:
for (i in attributes) { if (attributes[i] === 3) { console.log("3 found @ " + i); } } google-chrome-devtools
No comments:
Post a Comment