4

since migrating to Xcode 4 I am totally perplexed by the debug view inasmuch as I am unable to see the values of arrays / dictionaries etc.

Under Xcode 3 I could view debug console and see the actual values stored?

2 Answers 2

9

Debugging information now appears in the debug navigator (Cmd-5) and the debug area (Shift-Cmd-Y).

You can have these areas show up by default when you run the application (or hit a breakpoint) by toggling the options in the "Behaviors" tab of Xcode's preferences.

Sign up to request clarification or add additional context in comments.

2 Comments

Hi, thanks, I already have these on the screen but I do not see the values stored in variables? All it shows is the variable name and its type/class not the values stored in it?
You can also hover over a variable to inspect it or turn on the Variables view (appears to the left of the debugger interface/run log).
1

To see values inside arrays in xcode debug area choose the GDB debugger in your project scheme and have the variables you want to see defined as private variables.

Starting in xcode 4 the default debugger is LLDB. To change to GDB click on project name in schemes (next to "Stop" button near top of project window) Choose "Edit Scheme..." and then choose GDB in Debugger drop down.

One way to define a property variable so it can be seen in debug area is to define a private variable in the header file which has the @property statement.

@interface SomeObject : NSObject { @private NSMutableArray *someArray; // Allows visibility in Debug Area } @property (nonatomic, strong) NSMutableArray *someArray; @end 

1 Comment

you would be shocked how little coverage there is of enabling GDB-support in Xcode 4.5+ on SO. Thank You

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.