O'Reilly logo

Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming by Erica Sadun, Rod Strougo, Maurice Sharp

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Breakpoints, and Actions, and Code...Oh My!

Using a breakpoint is a way to stop code execution at a place you choose, or when any problems occur. All you do is click in the line number next to a piece of code, and Xcode inserts a breakpoint. Figure 14-9 showed one in blue on line 80.

When running code (on both the simulator and real devices) hits a breakpoint, Xcode stops execution and enters the debugger. You can examine the call stack, look at variables, step over code, or even step into other methods. The variable window shows you values and even lets you change a BOOL from YES to NO.

Most people try to find issues by inserting an NSLog statement where they think the issue is, running the code, getting closer, putting in different NSLogs, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required