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:
There are a number of options on the exception type (All, Objective-C or C++), whether to break on throw or catch, as well as the action once the exception is throw (e.g. log message, run debugger command, etc).