Doing More with Breakpoints
Many developers, even if they regularly use breakpoints, believe logging is the only way to pull control flow and state out of their programs when it’s not practical to stop dead at every pass through a segment of code. Not so. If you take nothing else away from this chapter, remember this: Almost never do you have to compile NSLog()
or other printing functions into your application for debugging.
Use breakpoint options instead of NSLog()
s. The options popover (Figure 28.2) is a little intimidating, but everything in it has a purpose, and once you understand what you can do, it all falls into place.
Get Xcode 5 Start to Finish: iOS and OS X Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.