Reputation: 460
I am not able to get dictionary/array value in console while debugging.
It always show message while po dictionary/array like
error: warning: Stopped in a context claiming to capture an Objective-C object pointer, but 'self' isn't available; pretending we are in a generic context
Upvotes: 2
Views: 1093
Reputation: 25
This is a debugger bug (Yeah, imagine that!)
Simply restart XCode, and it shouldn't be a problem for you anymore :)
EDIT:
Psyche! I was thinking of something else.
You're creating a retain cycle, and as of now, the debugger classifies this specific retain cycle this way (As I said, a bug).
To fix this, create a weak copy of self:
__weak __typeof(self)weakSelf = self;
Then for the self that's giving you trouble:
Change self.object
to weakSelf.object
Source: "self" not available in debugger on iOS 5.1
Upvotes: 0
Reputation: 1051
You can check the values of properties and variables using po [self variablename]
in console window. This way you can easily access the variables.
Also you can check with other projects weather the problem is with xcode or in your project configurations.
You can also expand the collapsed value in debug area. if it's expanding then you can access values by simply using po variablename
otherwise you need to use po [self variablename]
.
Upvotes: 3
Reputation: 1949
I'd the same issue and found out this solution. Changing this clang module debugging DEBUG to NO and RELEASE to YES will solve your issue.
Checkout this link below.
Upvotes: 1
Reputation: 315
Please refer the following screen shot where i have printed the value of an array
Upvotes: 0