Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Tracepoint messages: including the values of variables.

Tracepoint messages: including the values of variables.

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
4 Posts 2 Posters 723 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.
  • C Offline
    C Offline
    CrazyCarrot
    wrote on last edited by
    #1

    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}.)

    JonBJ 1 Reply Last reply
    0
    • C CrazyCarrot

      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}.)

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @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 :)

      C 1 Reply Last reply
      0
      • JonBJ JonB

        @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 :)

        C Offline
        C Offline
        CrazyCarrot
        wrote on last edited by CrazyCarrot
        #3

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

        JonBJ 1 Reply Last reply
        0
        • C CrazyCarrot

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

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0

          • Login

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