How to print more than 256 array elements in Xcode

2020-07-10 09:06发布

问题:

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

How can I print all of them?

回答1:

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.



标签: xcode lldb