Group Group Group Group Group Group Group Group Group

Beginning iOS Debugging - Part 3: Controlling | Ray Wenderlich Videos

Activate and deactivate individual breakpoints, disable all breakpoints in a project, and delete breakpoints in Xcode.

This is a companion discussion topic for the original entry at
1 Like

Great lesson! Can’t wait for the next lesson to come out.

1 Like

Hey! Great explanation :slight_smile:
I am facing troubles when I want to see my breakpoints flow. Instead of continuing in VC, Xcode goes to a thread execution screen and I am only able to follow the flow in this quite confusing way… Is there an Xcode configuration or something I can do to prevent this?


I think what you’re talking about refers to something Xcode calls “behaviors”. From Xcode preferences, navigate to the Behaviors tab. There are events listed on the left hand side. Under the Running category, there is a Pauses event. Click on that. You’ll see that the default action for that event is to show the Debug navigator. You can either manually switch back to the Breakpoints navigator when that happens, or you can deselect this checkbox to keep it from switching navigators for you. Let me know if that doesn’t answer the issue you’re facing.

Thank you!

I tried as you said, both the options, and it did not work out.
I continue seeing the “machine instructions” list, eg, “-> 0x10935c412 <+98>: movq -0x40(%rbp), %rsi”, in my debuging console :disappointed_relieved:

Xcode will show you that kind of code when you’re stopped at a place where you don’t have the code. For example, if you step out of a method into UIKit code, you don’t have the source for that, so it shows the assembly. You can still see the stack frames in the debug navigator, you can still use LLDB commands too. If you’re seeing that for your own code, you might have some build settings messing with your debug session. Are you seeing that in your own project or the source for the video?

Hi @jerbeers - thanks for the lesson. Good job.

I’m facing the same issue as @carolbonturi where Xcode steps into the assembly. I took a video to better explain:

I think we’re looking for the equivalent of “Only Debug My Code” option that other IDEs offer.


Thanks for the video, that helps me see what you’re experiencing. In this case, you’re choosing “step over” when you’re at the last line of your code in viewDidLoad (I think). There is no more of your code in the call stack, so it steps over the last line, out of your method, and into UIKit code. Since you don’t have the source for UIKit, it shows the disassembly. You usually would set a breakpoint in another method or continue at that point.

Makes sense. Thanks @jerbeers!

I like it very much, but it would be better if I can take notes and add them below each video, so next time when I watch it, it’s easy to remember what I learned in the past.