Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to print more than 256 array elements in Xcode lldb?

Tags:

xcode

lldb

When I use p or print it will only print the first 256 elements.

How can I print all of them?

like image 887
Michael Litvin Avatar asked Mar 07 '17 11:03

Michael Litvin


1 Answers

You can tell lldb to force all the array elements to be printed for a particular expression evaluation thusly:

(lldb) expr -A -- array_variable

You can also raise the maximum number of elements (lldb calls them "children") that get printed by default by running:

(lldb) set set target.max-children-count 1024

or whatever value you want. You can also put this in your ~/.lldbinit if you want to up this limit for all your lldb sessions.

like image 93
Jim Ingham Avatar answered Oct 26 '22 04:10

Jim Ingham