Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to view the text in an NSString in debug

I'm new to XCode 4 and I cannot figure out how to view the value of a variable such as a NSCFString while in a breakpoint. I see my Autos/Local but they are showing Hex values with Summary Unavailable. All I want to do is see the string itself as regular text. I'm even hovering over variables expecting to see their values like in Visual Studio with no luck.

like image 846
Keith Adler Avatar asked Sep 18 '11 14:09

Keith Adler


1 Answers

Turn on console view for debugger and at the prompt type:

(lldb) po myStringVariable

or

(lldb) po [self someStringProperty]
like image 139
Eimantas Avatar answered Sep 21 '22 15:09

Eimantas