I'm seeing a strange behavior with Xcode 6 debugger. I have created a singleton shared instance using the following code:
+ (instancetype)shared
{
static DataBaseManager *sharedInstance = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
sharedInstance = [[DataBaseManager alloc] init];
});
return sharedInstance;
}
Right after the object is initialized by calling the method like this:
DataBaseManager *manager = [DataBaseManager shared];
NSLog(@"");
I have placed a breakpoint on the "NSLog", and i'm seeing the following debugger status:
I have made sure I'm launching on debug mode, and that the build settings are fine, following the question here: Xcode debugger doesn't print objects and shows nil, when they aren't
Any ideas on why this is happening? This is the first time i have ever seen this kind of strange behavior. Any help would be much appreciated.
**UPDATE**
A bug was reported to apple bug report system.
The bug status is: Duplicate of 17164538 (Closed)
so it is probably a known bug in Xcode.