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. Immediate window in QT Creator?
Forum Updated to NodeBB v4.3 + New Features

Immediate window in QT Creator?

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 970 Views
  • 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.
  • G Offline
    G Offline
    Gertio
    wrote on 4 Jan 2020, 08:28 last edited by
    #1

    I have been working with Visual Studio and find the immediate window there very usefull for debugging, Does QT Creator have something like that? Currently on QT Creator 4.11.0.

    A 1 Reply Last reply 4 Jan 2020, 08:30
    0
    • G Gertio
      4 Jan 2020, 08:28

      I have been working with Visual Studio and find the immediate window there very usefull for debugging, Does QT Creator have something like that? Currently on QT Creator 4.11.0.

      A Offline
      A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on 4 Jan 2020, 08:30 last edited by
      #2

      Hi @Gertio ,

      What is the "immediate window"?

      Regards

      Qt has to stay free or it will die.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        Gertio
        wrote on 4 Jan 2020, 08:36 last edited by Gertio 1 Apr 2020, 08:38
        #3

        To tell shortly: While debugging and stopping on a breakpoint, you can insert C++ commands directly in there and return is printed. Something like python, where you start command line and type in "1+1" and it prints "2", you can use the variables there available at that brak point and also call functions, which were compiled. If you want to know more just google for visual studio immediate window.

        It is usefull if you want to e.g. fix a bug but dont know if something you have in mind will work, so you just use break point and then use that window and see if it returns the desired result. That way you dont have to restart the debugging for the possible ways to fix a bug (if there could be more than one way and you search for the most suitable one)

        1 Reply Last reply
        0
        • K Offline
          K Offline
          Kiranachari Shilpi
          wrote on 4 Jan 2020, 10:52 last edited by
          #4

          Hi @Gertio
          Ofcourse we have debugging mode in Qt Creator ,
          select a break point line on the program editor by clicking on the line number, red mark symbol will come after that you can see bottom left corner a Start debugging option upon click debugging will start , step by step iteration from the point of Break Point marked, another window open and show the compilation output and program flow .
          Here is the one example showing the debugging mode.

          1 Reply Last reply
          1
          • G Offline
            G Offline
            Gertio
            wrote on 4 Jan 2020, 10:55 last edited by
            #5

            Hi @Kiranachari-Shilpi ,
            Thank you for reply, but my question was not "Does QT Creator have debug mode?", it was "Does QT Creator have Immediate window?"

            A 1 Reply Last reply 4 Jan 2020, 11:52
            0
            • G Gertio
              4 Jan 2020, 10:55

              Hi @Kiranachari-Shilpi ,
              Thank you for reply, but my question was not "Does QT Creator have debug mode?", it was "Does QT Creator have Immediate window?"

              A Offline
              A Offline
              aha_1980
              Lifetime Qt Champion
              wrote on 4 Jan 2020, 11:52 last edited by aha_1980 1 Apr 2020, 12:00
              #6

              Hi @Gertio,

              for QML there is indeed the Debugger Console, as @Kiranachari-Shilpi's link shows.

              For C++, you can at least evaluate expressions.

              Some more functions might be available with direct debugger commands in the Windows > Views > Debugger Log. In principle you should be able to call functions from there, but I've never tried that.

              To sum up, some of the functionality is there, but not as nicely prepared as in VS. But it comes for free...

              Regards

              Edit: You may also comment and vote on QTCREATORBUG-19870 to improve the Debugger Console for C++.

              Qt has to stay free or it will die.

              1 Reply Last reply
              3

              1/6

              4 Jan 2020, 08:28

              • Login

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