• 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: Routine viewing of specific values of a complex data structure in the debugger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Routine viewing of specific values of a complex data structure in the debugger


  • Subject: Re: Routine viewing of specific values of a complex data structure in the debugger
  • From: Chris Espinosa <email@hidden>
  • Date: Tue, 25 May 2004 22:04:47 -0700

On May 25, 2004, at 7:29 PM, John Clements wrote:

I am using a framework that has a very nice string class (QString). It
handles Unicode strings, and provides lots of handy utilities. Only
problem is that is awkward to monitor the current value of a QString in
the debugger. One solution is to type "theTitle.latin1()" into the
debugger's expression evaluator (where 'theTitle' is a QString - see
attachment). The other solution is to burrow down into the structure to
find the  'ascii' field of the string class. Both approaches are
awkward and time consuming during intensive debugging. Can anyone
suggest an XCode technique to simplify routine viewing of the value of
a specific field in a complex structure? Perhaps I need to sub-class
QString?

If your debugger is showing the "Summary" field and you have Custom Data Display turned on in the Debug menu, you can enter your expression right into the Summary field and it will be evaluated for every variable of that type. Expressions you enter are saved (on a per-user basis) so you don't have to reenter them; you can also prepare a description file of ones you want to use consistently and put it in /Library/Application Support/Apple/Developer Tools/CustomDataViews and it'll be used for all projects.


Check the Foundation viewers in that folder of an example on how to write the viewers. There's a symbol in each expression that gets substituted with the variable being viewed.

Chris Espinosa
Apple
_______________________________________________
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: Routine viewing of specific values of a complex data structure in the debugger
      • From: John Clements <email@hidden>
References: 
 >Routine viewing of specific values of a complex data structure in the debugger (From: John Clements <email@hidden>)

  • Prev by Date: Routine viewing of specific values of a complex data structure in the debugger
  • Next by Date: Re: Controlling initialization order
  • Previous by thread: Routine viewing of specific values of a complex data structure in the debugger
  • Next by thread: Re: Routine viewing of specific values of a complex data structure in the debugger
  • Index(es):
    • Date
    • Thread