shridatt
shridatt

Reputation: 926

Debugging Skip to a step in for loop

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.

Upvotes: 1

Views: 533

Answers (1)

Chandrayya G K
Chandrayya G K

Reputation: 8849

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

Upvotes: 2

Related Questions