Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a trick to see NSString values in an NSMutableArray in Xcode debugger?

When I debug, I never get the value of an NSString inside of an array. All I see are cryptic symbols, probably memory addresses of something like 0x1dc3753. I dig into all the stuff and expand everything, but no humanly readable value at all. Not really useful at all. How do you go about this (besides NSLogging everything)?

like image 401
dontWatchMyProfile Avatar asked Feb 24 '10 11:02

dontWatchMyProfile


2 Answers

Also, same thing as 'Print Description' is to type po variableName in the debugger console.

like image 112
Stefan Arentz Avatar answered Oct 08 '22 07:10

Stefan Arentz


You should be able to see at least an abbreviated string in the variables pane when you expand a NSMutableArray. If you can't, that suggest you don't actually have strings as elements.

In the variables pane, control-click and from the pop-up menu select Show Type Column. Then when you drilled down into the array, it will show you the class of each element.

like image 30
TechZen Avatar answered Oct 08 '22 06:10

TechZen