My class has a member variable which is a NSNumber, like so:
@interface C : NSObject {
NSNumber* _n;
}
During debugging, I am stopped at a breakpoint, and I want to change the value of the NSNumber. How can I do it?
I tried the XCode variables window, but that does not work.
I tried the XCode debug console, for example
expr _n = @1
but that gives the bizarre message error: assigning to 'NSNumber *' from incompatible type 'NSNumber *' -- no kidding! Try it.
I also tried
expr _n = [NSNumber numberWithInt:1]
but that gives the same thing.