Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 3.2 Debug: Seeing whats in a string?

Tags:

xcode

Does anyone know the display formatter that I would need to add to the summary field to display the contents of the NSString objects contained in the NSArray shown? I have already added the formatter below for NSArray so that it displays its contents...

"{(int)[$VAR count]} objects {(NSString *)[(NSArray *)$VAR description]}:s"

alt text

I would really like (0-6 marked in red) to display in "Summary" as follows:

0 = Monday

1 = Tuesday

2 = Wednesday

3 = Thursday ... etc.

gary

like image 387
fuzzygoat Avatar asked Dec 01 '09 15:12

fuzzygoat


1 Answers

I got it to display monday, tuesday, wednesday, but not sure why yet:

  1. I started with this code to create an array like what you describe:

    NSArray * myArray2 = [NSArray arrayWithObjects:@"monday",@"tuesday",@"wednesday",nil];

    In debugger it didn't show the expected monday, tuesday, wednesday on each row.

  2. This step is important: In debugger, I double clicked on the summary and pasted in the string you were using:

    {(int)[$VAR count]} objects {(NSString *)[(NSArray *)$VAR description]}:s

    That didn't work.

  3. But immediately after, I clicked on the same summary field (it highlighted the string I just pasted), and then pressed the delete key, and then clicked return.

    Then it showed Monday, Tuesday, Wednesday on each row in array.

like image 120
jm. Avatar answered Sep 27 '22 23:09

jm.