O'Reilly logo

iOS App Development Portable Genius by Richard Wentk

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

Using the Xcode Debugger

You can use the debugger to do the following:

bullet_2c.tif Pause your app at any line of code.

bullet_2c.tif Pause your app if a condition is true.

bullet_2c.tif Step through code line by line.

bullet_2c.tif Skip over methods and functions.

bullet_2c.tif While the app is paused, view variables, objects, and memory.

The debugger is built into Xcode. You don’t need to modify your code to use it. But you do need to set one or more breakpoints, or pause locations.

genius_2c.eps

Breakpoints have many powerful options. You can set them to play a sound, run an external script, or generate a log message—among other options. Most of these options are specialized, and you don’t need them for basic debugging. But it’s useful to know that they’re available.

Breakpoints can be unconditional or conditional. Xcode always pauses at an unconditional breakpoint, but pauses at a conditional breakpoint only if a condition you specify is true. For example, ...

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