Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. in debugger, how to show struct field as val of struct?
Forum Updated to NodeBB v4.3 + New Features

in debugger, how to show struct field as val of struct?

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 301 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    davecotter
    wrote on last edited by davecotter
    #1

    i have many structures that, somewhere inside, is the important value i want to see in the debugger.
    Xcode has a method to say "whenever you see this struct, have it resolve to this field inside the struct". for example, i have this:
    Screen Shot 2021-03-20 at 3.48.57 PM.png
    in Xcode, i can right click the line "textStr @xxx SuperString", and pick "Edit Summary Format…", then type:

    {$VAR.i_ref}:s
    

    and now suddenly "textStr" reads as "Not Applicable", instead of "@xxx"
    is there a way to do this ONCE, and then forevermore see the result directly in the variables panel, even on subsequent runs?

    note that the summary format can also call code like this:

    {(const char *)$VAR.c_str()}:s
    

    or

    {OSTypeToString($VAR).utf8Z()}:s
    

    -dave

    1 Reply Last reply
    0
    • nageshN Offline
      nageshN Offline
      nagesh
      wrote on last edited by
      #2

      @davecotter I think this can be done by right click (locals/Expressions tab) and "add new expression evaluator.." Type the variable you want to monitor it will be shown in Expressions tab

      1 Reply Last reply
      0
      • D Offline
        D Offline
        davecotter
        wrote on last edited by
        #3

        that's exactly what i do NOT want. i want the resolved var contents to be shown IN the variables panel. and i want to be able to have it automatically apply the same "summary format" to EVERY variable of that type, forevermore (remembering the pref).

        sure i can show a copy of ONE variable in the expressions field, but that works once, for one var. i need a solution that works permanently, and shows the results IN the variables panel, without my ever having to configure it again. like Xcode.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          davecotter
          wrote on last edited by davecotter
          #4
          This post is deleted!
          1 Reply Last reply
          0
          • D Offline
            D Offline
            davecotter
            wrote on last edited by davecotter
            #5

            if anyone feels this might be useful, please click here to vote for it.

            1 Reply Last reply
            1

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved