Adam Waite
Adam Waite

Reputation: 18845

How do I print C variables in LLDB Debugger?

I'm working in Xcode 4 and I want to print, in the debugger, variables like ints, chars, arrays, custom structs, etc. Is this possible?

With Objective-C I could do something like:

int three = 3;
> po [NSString stringWithFormat:@"%i", three];

Thanks.

Upvotes: 12

Views: 19466

Answers (1)

J_D
J_D

Reputation: 3586

po stands for Print Object, which essentially calls the description method on the object.

Use p to print an integer. For example:

p three

Upvotes: 24

Related Questions