Wrap-Up

By this point, you should be well-equipped to track down and eliminate many different kinds of logical bugs in your application. Just look at all the tools Xcode gives you:

  • Basic breakpoints let you stop and step through program flow, while checking on the values of variables at each step.

  • The LLDB command line in the Console lets you evaluate expressions and even modify the state of your app while it’s running in the debugger.

  • For common problems, Xcode comes built-in with tools to catch main thread violations in UIKit and AppKit, and for memory-addressing bugs when you’re working with pointers.

  • For layout and other UI bugs, you can use multiple view debugging tools in the Simulator and Xcode, including the awesome 3D power of the View Hierarchy Debugger.

These approaches will make your app run correctly, but there’s still more work to do. It’s possible your non-crashing, good-looking, logically correct app is wasting memory or CPU resources… and that can lead to slowdowns, instability, or reduced battery life. The next chapter shows off how Xcode helps you find and fix those bugs.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.251.37