5

I'm using the console to po some variables, in this case I have a NSMutableArray, I want to see its count. I get a wonderful error.

Any ideas?

I am aware I can see the count in the variable list (it says @"1 object"), but I seem to have this error for multiple getters and properties while using po.

UPDATE: Seems like the square bracket notation is the key, and casting to int makes it readable.

Andy B
  • 629
  • 8
  • 15

1 Answers1

2

use (gdb) p (int)[array count]

Parag Bafna
  • 22,812
  • 8
  • 71
  • 144