Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Print an NSArray in LLDB

Tags:

lldb

What's your favorite way to print the contents of an NSArray using LLDB?

A python script? An inline for loop? An Objective-C method call?

I know it's easy to print an object by index. I want to print all objects at once.

like image 770
Rose Perrone Avatar asked Jan 28 '13 17:01

Rose Perrone


1 Answers

The description method on NSArray iterates through the objects in the array and does a description on them. No need to invent anything:

po [fooArray description]
like image 189
escrafford Avatar answered Oct 02 '22 00:10

escrafford