Tracepoint messages: including the values of variables.
-
In the properties of a breakpoint, it can be set to "tracepoint only", and a message can be set.
Can the values of variables be included in the message, and if so what is the syntax for doing so?(For example in Visual studio, you can include the value of a variable in the equivalent message simply by including the name in curly brackets, eg {x}.)
-
In the properties of a breakpoint, it can be set to "tracepoint only", and a message can be set.
Can the values of variables be included in the message, and if so what is the syntax for doing so?(For example in Visual studio, you can include the value of a variable in the equivalent message simply by including the name in curly brackets, eg {x}.)
@CrazyCarrot
I suspect that from the lack of documentation and the fact that https://stackoverflow.com/questions/74552103/qtcreator-tracepoints-how-to-print-the-value-of-a-variable has gone unanswered that you can't/there is no syntax, or if there is it is unknown :) -
@CrazyCarrot
I suspect that from the lack of documentation and the fact that https://stackoverflow.com/questions/74552103/qtcreator-tracepoints-how-to-print-the-value-of-a-variable has gone unanswered that you can't/there is no syntax, or if there is it is unknown :)@JonB
Thanks for the reply. I'd seen that question on stackoverflow has gone unanswered, but they did say " I know it's possible, but I forgot the formatting rules".
So I just wanted to check whether the values of variables could be included, although it is undocumented.
I've used Visual Studio a lot, and have found this functionality extremely useful, and so I'm really surprised that it does not appear to be included in Qt Creator. -
@JonB
Thanks for the reply. I'd seen that question on stackoverflow has gone unanswered, but they did say " I know it's possible, but I forgot the formatting rules".
So I just wanted to check whether the values of variables could be included, although it is undocumented.
I've used Visual Studio a lot, and have found this functionality extremely useful, and so I'm really surprised that it does not appear to be included in Qt Creator.@CrazyCarrot
I think the SO guy was falsely imagining or confusing with VS!
Without getting into it, I found VS had more features in it than Qt Creator.
It is just possible that Creator's Message box, which I believe appears for the "tracepoint", passes that on "raw" to the underlying debugger, so perhaps some gdb syntax for it would work with gdb debugger or if there is any equivalent for MSVC, but I don't know and wouldn't hold my breath.