Is there any trick to see the NSString values ​​in NSMutableArray in the Xcode debugger?

When I debug, I never get the NSString value inside the array. All I see are cryptic characters, possibly memory addresses of approximately 0x1dc3753. I dig all things and expand everything, but it has no universal value. Not quite useful. How do you do this (besides NSLogging everything)?

+6
debugging iphone xcode nsstring nsarray
source share
3 answers

You should be able to see at least the shortened string in the variable area when expanding NSMutableArray. If you cannot, this assumes that you actually have no rows as elements.

In the variable area, click control, and in the pop-up menu, select Show Type Column . Then, when you collapse into an array, it will show you the class of each element.

+2
source share

In addition, the same as "Print Description" is to enter po variableName in the debugger console.

+20
source share

Set a breakpoint next to the array you want to test, and hover over the array variable. Then, hover directly over the right triangle and you will see an icon that represents two triangles (one above the other). Click on it and select "Print Description" from the menu.

+1
source share

All Articles