Rendy
Rendy

Reputation: 5698

Run breakpoint after certain loop in XCode?

Can I run breakpoint after certain loop in XCode? Since I have very many breakpoints, I don't want to disable the breakpoint one by one then enable again or click the run breakpoint over times.

for(int i = 0; i < 100; i++){
  NSLog(@"Hi!");               /* Breakpoint here */
  ...
  ...                          /* And more breakpoints */
  ...
}

I want to enable the first breakpoint after certain loop, for example, i = 53

Upvotes: 0

Views: 417

Answers (2)

Bhumika
Bhumika

Reputation: 876

Using this shortcut keys ⌘+Y you can enable or disable ALL BreakPoint whenever you want.

To set conditional breakpoint you have to Edit breakpoint.

To do this you have to Right click on breakpoint and then select Edit Breakpoint and then see below image to set condition on breakpoint.

enter image description here

Try this it may help you.

Upvotes: 3

Kokodelo
Kokodelo

Reputation: 436

By right-clicking on a breakpoint, you're able to "edit the breakpoint". So you're able to add a condition (there is no auto-completion so be careful).

There plenty of other condition like "times before stopping", and I think this one is the one you're looking for.

Upvotes: 1

Related Questions