RE: Viewing NSArray and NSDictionary types
RE: Viewing NSArray and NSDictionary types
- Subject: RE: Viewing NSArray and NSDictionary types
- From: "Karan, Cem (Civ,ARL/CISD)" <email@hidden>
- Date: Wed, 17 Mar 2004 10:30:37 -0500
- Thread-topic: Viewing NSArray and NSDictionary types
Cool, thanks, that solved my problem.
Thanks,
Cem Karan
> > I'm trying to debug an application that I'm writing that uses some
> > NSMutableArray and NSMutableDictionary instances to move
> data around.
> > The problem is that I don't know if I'm getting the right
> data there
> > in the first place. My current method of figuring things out is to
> > use NSLog a lot because all of the objects respond to the
> description
> > selector. However, I would like to use XCode and gdb in
> some way so
> > that I can simply see what is in those data structures. Is
> there an
> > easy way of doing this? IIRC there is some way of doing a custom
> > plugin and such, but that is way, way too much overkill for
> this; if I
> > can just
> > see the description responses, that is enough.
> >
> You could use the gdb command "po" (print object).
>
> to print out the whole array use this:
> po testArray
>
> you can do function calls directly from gdb too, so to print out
> individual element use something like this:
> po [testArray objectAtIndex:2]
>
>
> HTH
> ~Hua Ying
_______________________________________________
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.