skip to Main Content

I wanna skip one iteration of a for loop with a lot of if statements. When i click the Step Over it just jumps into the if statements.

for (int i = 0; i < elements.length; i++) {}

Can I just skip from one iteration of the loop into the next iteration?

2

Answers


  1. Add a conditional breakpoint, with condition i>0
    You can find more information here https://developer.android.com/studio/debug

    Login or Signup to reply.
  2. You can add a breakpoint inside the loop and every time the debugger pauses at that breakpoint you can resume the debugger and it will pause again inside the loop for the next iteration.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search