What you are describing is very strange. I set up a test application and was able to print the object from the singleton just fine.
#import "testAppDelegate.h"
//A Session Singleton
@interface Session : NSObject {
NSArray *myArray;
}
@property (nonatomic, retain) NSArray *myArray;
@end
@implementation Session
@synthesize myArray;
static Session *sharedSession;
+(Session *)sharedSession {
if (!sharedSession) {
sharedSession = [[Session alloc] init];
sharedSession.myArray = [NSArray arrayWithObjects:@"A",@"B",@"C",nil];
}
return sharedSession;
}
@end
//App Delegate
@implementation testAppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
NSLog(@"%@",@"Breakpoint Here"); //Here is where I set My breakpoint
return YES;
}
- (void)dealloc {
[super dealloc];
}
@end
In GDB:
(gdb) po [[Session sharedSession] myArray]
<NSCFArray 0x4710630>(
A,
B,
C
)
I did this using the 3.2 iPhone SDK, using a default project template, in the debug mode without changing any build settings. I suspect you may have issues in your build settings. I have noticed that debugging is wonky on the 4.0 beta sdks. If you are using 4.0, remember that it is still beta, and your problems may really be someone else's problems.