• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Displaying contents of NSArray and family in debugger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.



  • Follow-Ups:
    • Re: Displaying contents of NSArray and family in debugger
      • From: Chris Espinosa <email@hidden>
    • Re: Displaying contents of NSArray and family in debugger
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: Real C++ compile problems
  • Next by Date: Re: Displaying contents of NSArray and family in debugger
  • Previous by thread: Re: Project references
  • Next by thread: Re: Displaying contents of NSArray and family in debugger
  • Index(es):
    • Date
    • Thread