James Kuang
James Kuang

Reputation: 10730

Xcode 5 debugger no objective-c description available

In Xcode 4, when I use the debugger to print an NSArray count, it would show in the console like this:

po [self.array count]
3

In Xcode 5, doing this gives me

[no Objective-C description available]

This seems to be the case with all numerical types. What is the change or reasoning behind this behavior?

Upvotes: 17

Views: 3068

Answers (2)

danielbeard
danielbeard

Reputation: 9149

The command po stands for "Print Object". self.array.count is type NSUInteger which is not an object. Use the p command instead, which is intended to print non object values. E.g.

p self.array.count

The LLDB docs are a great resource.

Upvotes: 40

James Kuang
James Kuang

Reputation: 10730

In the meantime, I found that if you enclose any numerical type into an NSNumber, it would print out in the console like this:

int index = 1;

po index
[no Objective-C description available]
po @(index)
1

po @([self.array count])
3

Upvotes: 2

Related Questions