• 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
Re: Viewing Contents Of CFDictionary?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: Viewing Contents Of CFDictionary?
      • From: Finlay Dobbie <email@hidden>
References: 
 >Viewing Contents Of CFDictionary? (From: Lance Drake <email@hidden>)

  • Prev by Date: Re: a modest proposal
  • Next by Date: Re: Application fails to launch on certain machines, execle err=22
  • Previous by thread: Viewing Contents Of CFDictionary?
  • Next by thread: Re: Viewing Contents Of CFDictionary?
  • Index(es):
    • Date
    • Thread