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.

Tags:


Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments

Subscribe to new posts:

You'll get an email whenever a I publish a new post to my blog and nothing more. -- Corbin

As an Amazon Associate I earn from qualifying purchases.

(c) 2008-2024 Corbin Dunn

Privacy Policy

Subscribe to RSS feeds for entries.

63 queries. 0.209 seconds.

Log in