O'Reilly logo

Cocoa Programming for OS X: The Big Nerd Ranch Guide by Aaron Hillegass, Adam Preble, Nate Chandler

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 Hints

Now that you are writing code, not just copying it from the book, you may need some debugging hints.

Always watch the console.

If a Cocoa object throws an exception, it will be logged to the console and the event loop will be restarted. If you are not watching the console, you will not notice the error.

Always use the Debug build configuration during development.

The Release configuration has had its debugging symbols stripped. The debugger will act a bit strangely when it is dealing with a program with no debugging symbols.

Here are some common problems and common fixes:

Crash when programmatically using a view set up using Interface Builder.

You probably forgot to make a connection ...

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