I had some problems debugging some code, so I wrote this little piece to check it:
NSMutableArray *output = [NSMutableArray array]; while (true) { NSMutableArray *input = [NSMutableArray array]; for (int i = 0; i < 30; i++) { [input addObject:[NSNumber numberWithInt:i]]; } [output addObject:[NSArray arrayWithArray:input]]; NSLog(@"%@, %@", input, output); }
I hooked a line breakpoint using NSLog and found some interesting things. Going into the variable view, I opened the input, and it correctly showed it as filled with NSNumber objects. Then I opened the output, which correctly showed as containing one array. However, when expanding this array, it showed that it is empty.
However, NSLog revealed a different story. It correctly displayed the multidimensional output array as containing arrays filled with NSNumbers. Don't multidimensional arrays work with previewing a variable in the debugger? Here's a picture of the problem:

I am completely puzzled by this. Does anyone else have this problem?
source share