Skip to Main Content
Objective-C® For Dummies®
book

Objective-C® For Dummies®

by Neal Goldstein
October 2009
Beginner content levelBeginner
456 pages
8h 59m
English
For Dummies
Content preview from Objective-C® For Dummies®

Chapter 8. Using the Debugger

In This Chapter

  • Knowing how things can go wrong

  • Using Xcode's Debugger

  • Finding and fixing logic errors with the Debugger

Now that things have gotten a little more interesting, so will the errors.

Let's face it. There are always going to be errors. No matter how good you are, how much experience you have, how careful you are, or even how smart you are, they are a programming fact of life.

You'll come up against three kinds of errors. Each one has a unique personality and associated techniques for finding and correcting. Here is a list of the three types you'll come up against:

  • Syntax errors

  • Runtime errors

  • Logic errors

The last two types, runtime and logic errors, are what are commonly referred to as "bugs."

Identifying the Usual Suspects

Note

While there is no exercise for this chapter, you can follow along with me if you like by using the project in the Chapter 8 Start Here folder in the Chapter 8 folder on the CD. Or you can use the project you use at the end of Chapter 7.

Catching syntax errors

As I mentioned earlier in this book, compilers take your source code and turn it into something the computer understands. For that process to go smoothly, the source code you give the compiler has to be something it understands. All of the operations and framework functionality I cover in Chapter 4 and continue to cover have to be coded in a certain way, and the compiler expects that you follow those rules (syntax). When you don't, it gets visibly annoyed. So when you type ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Objective-C

Objective-C

Jiva DeVoe
Cocoa in a Nutshell

Cocoa in a Nutshell

Michael Beam, James Duncan Davidson

Publisher Resources

ISBN: 9780470522752Purchase book