Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging a For-loop; Fast-Forward

So I'm working on a project where I have really long for loops and I'm usually encountering problems when getting close to the end of the loop, but it's pretty much impossible to get there manually by stepping into the loop millions of time. I know I could just change the counter variable, but in this case it would not work because the side-effects of each iteration wont happen. Is there a way to make a breakpoint stop on a place after 999999998 iterations? I'm using Visual Studio Ultimate 2010

like image 241
leonsas Avatar asked Apr 12 '12 16:04

leonsas


1 Answers

put a breakpoint, right click on it, choose condition set

i == 999999998 //if your loop looks like for (var i == 0;....
like image 180
Raphaël Althaus Avatar answered Nov 02 '22 00:11

Raphaël Althaus