Displaying contents of NSArray and family in debugger
Displaying contents of NSArray and family in debugger
- Subject: Displaying contents of NSArray and family in debugger
- From: Paul Sargent <email@hidden>
- Date: Sun, 27 Jun 2004 18:11:32 +0100
Hi all,
Does anybody know a way to display the contents of an NSArray in the
XCode debugger?
I'm just starting out doing some of the Cocoa code (Obj-C), and I was
trying to work out if doing addObject to a NSMutableArray resulted in a
reference to the object, or a reference to a copy of the object being
added to the array. To do this I wrote a little code which added the
same object to an array multiple times, and I'd thought I'd look in the
debugger to see what happened.
Now, although the data view will give me a nice summary of how many
items there are in my array, I can't seem to find the items themselves
(and I can consistently crash GDB by opening up the ivars part of the
class).
I managed to get something working by doing a 'print (char *)
[[testarray description] cString]' in the console, but that seemed a
bit obscure.
Am I missing something obvious?
Thanks
Paul
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.