Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Property 'count' not found on object of type 'NSMutableArray *' PO command in lldb

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.

like image 273
Andy B Avatar asked Nov 04 '22 10:11

Andy B


1 Answers

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

like image 101
Parag Bafna Avatar answered Nov 15 '22 06:11

Parag Bafna