Xcode 4: Tracking Down Crashes with Exception Breakpoints

Xcode 4 offers a simple way to generate a breakpoint whenever an exception occurs. A great idea when you need to track down application crashes.

Here’s how to set a global breakpoint (so to speak):

In the break point navigator (⌘6), click the plus (+) symbol in the lower left corner. Choose Add Exception Breakpoint. The exception breakpoint options are shown in the dialog below:
Continue reading

Xcode Tip: Breakpoints Have So Much More To Offer Than Simply Stopping On A Line

Breakpoints in Xcode offer many options for customization. If you aren’t using this flexibility, you are missing an opportunity to shorten your debug cycle.

For example, you can set a conditional option to ignore a breakpoint a specified number of times. There is also a list of actions that you can associate with a breakpoint, including running a shell command or applescript, executing a debugger command, or playing a sound (one of my favorites to know I reached a certain point in my code).

To configure these options, right click on breakpoint:
Continue reading