Important: Please read the Qt Code of Conduct -

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

  • 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:


    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




  • @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

  • 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.

  • This post is deleted!

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

Log in to reply