O'Reilly logo

Learning Objective-C by Developing iPhone Games by Amy M. Booker, Joseph D. Walters

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

Debugging your code

So how do we check our code when something is going wrong? There are two things that you can do: optimize your code and debug your code. Optimizing your code is when you take existing code that is working and make it run more efficiently. Debugging is when you are trying to find problem areas and fixing the problems. Xcode has some excellent tools for debugging our code. Let's start with the debugging area. Navigate to View | Debug Area | Show Debug Area as shown in the following screenshot:

Debugging your code

This will open a panel below your workspace with the debugger as shown in the following screenshot. We discussed the basics of the debugger ...

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