Corbin's Treehouse - Corbin Dunn, Santa Cruz, CA
Plug Bug

Xcode debugging tips

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.

(c) 2008-2017 Corbin Dunn

Corbin's Treehouse is powered by WordPress. Made on a Mac.

Subscribe to RSS feeds for entries and comments.

35 queries. 0.409 seconds.