1

Considering debugging through a for loop

The length for this loop is just used for demo purpose

for (int i = 0; i < 10000; i++) {
    //do something
    //something more
    //something more
}

how do i skip to Xth iteration i would want to test : in this case if i want to test what happens when i=567.

is there any way by which i can have eclipse halted precisely at i=567 in this loop ?

I am debugging over many for loops which run over varying large lengths.

shridatt
  • 896
  • 4
  • 15
  • 39
  • 1
    possible duplicate of [how to use conditional breakpoint in eclipse?](http://stackoverflow.com/questions/7194326/how-to-use-conditional-breakpoint-in-eclipse) – Aaron Digulla May 20 '14 at 09:18

1 Answers1

2

Switch to Debug Perspective.Go to Break point view. Select the break point and enable hit count and enter hit count as 567.

enter image description here

Chandrayya G K
  • 8,719
  • 5
  • 40
  • 68