Re: Viewing Contents Of CFDictionary?
Re: Viewing Contents Of CFDictionary?
- Subject: Re: Viewing Contents Of CFDictionary?
- From: Chris Espinosa <email@hidden>
- Date: Sun, 13 Jun 2004 08:40:40 -0700
On Jun 13, 2004, at 4:25 AM, Lance Drake wrote:
Is there any such utility or strategy - short of writing the contents
out to a file - that'll let you look at the key/value pairs of a
CFDictionary during debug? XCode gives me an address and the number
of items in the dict - but it would be great to be able to solve the
runtime mystery of what's really in there. Mebbe I should write this
up as a feature/enhancement 'bug'? - or, am I just spoiled by the
otherwise really great vars support in XCode?
Two ways to do it:
First, from the gdb console during debugging, there's always 'po'. It
prints the object it's given, doing its best to deduce what CF type it
is and giving you a readable version of its contents. It is not fast,
and its output can (especially for deep-nested CFDictionaries) be
bulky, so it's not a good candidate for, say, putting in the UI to be
executed every step.
But if you want to see the value of a specific key of a dictionary at
every step, you can enter a short C expression to extract that as a
known type (e.g. CFString) in the "Summary" field of the debugger:
See
/Developer/Applications/Xcode.app//Contents/PlugIns/
GDBMIDebugging.pbplugin/Contents/Headers/DataFormatterPlugin.h for
details of the format.
Chris
_______________________________________________
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.