while (true) {
var a = getValue('a');
var b = getValue('b');
var c = getValue('c');
var d = getValue('d');
doSomething(a, b, c, d);
}
if (c === 3) debugger
--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/657aaaa6-705c-4e3d-8d7e-155999d876f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Not through watch expressions, but using conditional breakpoints -Set a breakpoint, right click on it and select "Edit breakpoint...". Type an expression (c === 3) and press Enter. It will break only when the expression is truthy.
☆PhistucK
On Fri, Apr 8, 2016 at 4:53 PM, Sebastián Balay <sebasti...@wolox.com.ar> wrote:
Hi there, I'm debugging a long while loop and right now I put a breakpoint inside the while loop to check the variable values. But I'm not interested in those values during the whole loop, I just want to check that when one of those variables matches certain value. Is it possible to accomplish that using the watch expressions?.I'll add a quick and simple example to try to make my point clear:while (true) {var a = getValue('a');var b = getValue('b');var c = getValue('c');var d = getValue('d');doSomething(a, b, c, d);}So, I only want the execution to stop when c === 3. Debugging the entire while loop and check the variable value until it is 3 takes a lot of time.This code is in production, so I can not change it to do something like:if (c === 3) debuggerThanks!
--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-developer-tools+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/ae0c57b0-8380-4fa9-9278-0f3ed2cc248f%40googlegroups.com.