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?
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With