I am trying to find an error in my code. The problem is the error occurs in a loop. But the loop iterates about 500 times. Instead of clicking through the loop. Is it possible to skip over a certain amount of the loop ??
You can add a breakpoint after the loop and click F8 (resume). The debugger will stop on the next found breakpoint, e.g. you will have skipped the loop(s).
You can also click on the line you want to skip to and hit Ctrl+F10 (Run to Cursor).
You can select "Disable All Breakpoints" from the Debug menu. This and then continue with F5 . You could set this up as a keyboard shortcut under Tools/Options/Keyboard.
VS allows you to set a condition on a breakpoint in terms of variables that are in scope. So, in your case, you can test against the loop counter.
Here is a crude answer:
if ((iter % 10) == 0) {
int stop = 1;
}
Then place a break-point at "int stop = 1;". Perhaps, there is a better way in VS but this is what I do from time-to-time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With