John Brown
John Brown

Reputation: 63

C - How to view pointer to array of strings as array in Xcode's debugger

So I have char **sentence with sentence[0] = string0, sentence[1] = string1, etc. Is there a way I can print the entire array in lldb? So that it shows up as {string0, string1, ...}

Upvotes: 0

Views: 1022

Answers (1)

Jim Ingham
Jim Ingham

Reputation: 27110

This is answered in:

View array in LLDB: equivalent of GDB's '@' operator in Xcode 4.1

particularly, you can use the parray command in any recent lldb.

There isn't a way to do this in the Xcode Locals view, but you can do this in the Xcode Debugger Console.

Upvotes: 1

Related Questions