Chapter 11
Fixing the App When It Breaks

Congratulations! We have completed all the code for our app. Now we can get started on the real work we will be doing as a developer: debugging.

Bugs happen. Even the most awesome rock-star programmer writes bugs. In truth, developers spend only a fraction of their time writing code. A lot more time is taken up by debugging that code. So one of the single biggest favors we can do for ourselves is to become fast and efficient debuggers.

In this chapter you’ll learn about several methods for debugging, starting with the most basic one, print. We’ll cover the various kinds of breakpoints, and then we’ll take a nickel tour of LLDB, Xcode’s default debugger. You will learn how to print to the console using a breakpoint and how to monitor a variable for changes. Finally, you’ll find out how to make your app crash in the place that the problem exists and not several steps afterward.

By the end of this chapter, you’ll have the skills for dispatching bugs fast so you can move on to bigger and better things.

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

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