I'm writing an iOS app and I need help using the built-in Xcode debugger. Suppose I have an object called HomeViewController
that has three properties
@property (nonatomic) BOOL finished;
@property (nonatomic, strong) NSArray *myArray;
@property (nonatomic, strong) NSString *myName;
@synthesize finished = _finished, myArray = _myArray, myName = _myName;
Suppose I have a breakpoint in this class. How would I view the contents of these properties? I've tried things such as po myName
, print myName
and print [self myName]
but I can't figure out how to do this. I've tried using LLDB but I keep getting the same error that this person encountered (lldb fails to print variable values with "error: reference to 'id' is ambiguous") . The accepted answer to this question was, LLDB is broken and that I should just use GDB; however, I refuse to accept that something so fundamental is broken.
Nevertheless, I've also tried using GDB with similar commands as above; however, I can't get GDB to work either. Help please