Chapter 14. Debugging an iOS Application
In the previous chapter, we learned about how to use unit tests to prevent problems in your code from occurring in the first place. While preventative measures are great, what happens when you can't prevent an issue? Your unit test fails, your new feature isn't working as intended, the app is crashing for an unknown reason, any way you slice it, you've got a bug!
With unit tests and debugging under your belt, by the end of this chapter you'll be well on your way to building clean, efficient, bug-free applications that prevents both user and developer frustration.
In this chapter, we're going to cover:
- Debugging with
print()
, breakpoints, and the call stack - Using advanced debug tools like the Address Sanitizer
- Fixing visual issues with the View Debugger