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.

Previous Post
More circus pictures...
Next Post
Check out this trials sequence
0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments

As an Amazon Associate I earn from qualifying purchases.

(c) 2008-2021 Corbin Dunn

Privacy Policy

Subscribe to RSS feeds for entries.

61 queries. 0.382 seconds.

Log in