Xcode debugging tips

Apple, Cocoa, General

It might be nice to note a few Xcode debugging things that I tend to do. Frequently, I’ll want to break on a specific symbol, like

-[NSException raise]

Well, there are several ways to do this.
One way is to drop to GDB and type “b -[NSException raise]”.
Another way is to bring up your breakpoints window in Xcode and add a symbolic breakpoint:

Double Click To Add Symbol

and type in the same thing, “-[NSException raise]”.

But wait! You can be lazy. Just type “raise” and Xcode will then prompt you to select the right symbol:

Select The Right Raise

You can also do this for a generic symbol, like “drawRect:” and then select just the one you want:

Select Draw Rect

Simple, and easy! Let Xcode do a lot of the work for you.
Some things to note:
1. Don’t bother typing the [ and ], or the minus or plus
2. Be sure to type the symbol name with the correct case and :’s.

Next in Apple
Greener AAPLs

Leave a Reply

avatar
500
  Subscribe  
Notify of

(c) 2008-2019 Corbin Dunn

Privacy Policy

Subscribe to RSS feeds for entries.

83 queries. 0.666 seconds.

Log in