Qt World Summit: Submit your Presentation


Debugger Not showing attribute values



  • Hi,

    I'm using Qt 5.15 with QtCreator and up to date with the latest patches in QtCreator. Compiling on Windows using VS 16.6.30204.135(amd64) and the debugger is configured auto-detected using cdb.exe located in c:\Program files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe.

    The problem is when I enter a function by single step the right panel that shows the current status of the values is blank, however when I go into some other function it then reappears and I'm able to see the variables and its values/contents. Also when I mouse hover over a variable there is nothing there and I get a tool tip "Expression to Complex" . It seems this broke some time ago when QTcreator notified me for an update which I went ahead and did. There have been several updates to QTCreator for the debugger since then but still I'm running into the same issue. It is frustrating because I can't see the sate of values just when I need them. I prefer not to place print statements all over the place which defeats the whole purpose of having a debugger in the first place.

    Is there some setting that needs to be implemented to fix this?

    Thanks in advance!



  • Any help please? Someone must know something?


  • Lifetime Qt Champion

    Hi @leinad,

    Please have a look into View > Views > Debugger Log and search for obvious errors.

    Regards



  • Hi aha_1980,

    I did as you said but did not see any obvious errors at least no messages which are different from when it does work. I did find something out accidently which is strange. When I inserted qDebug() statements in the method, then the debugger showed the attribute values in the left pane. So it seems adding new code cleared it up. Any ideas why that would happen?

    Thanks again!



  • @leinad
    Did you completely clean the output directory and rebuild when you noticed the problem originally? If you remove the qDebug() statements now (and rebuild) so that it is back as it was when you found it wrong, does it revert to wrong or stay good?



  • I always did a new clean build. I removed the debug statements and it continues to display. So for some reason adding a statement and then later removing it, clears it up. I always do "Clean Project xxx for all Configurations". Should there be something else I should do?

    Also which may or may not be related, when I hover on a variable and get a value with a tool tip, when I click on the pin, the tooltip should stay up so as the variable changes I should see it in the tool tip. What happens is when clicking on the pin the tool tip disappears and the variable is highlighted in the right debug panel. The tool tip used to always stay up until I dismissed it. I think that changed on a debugger update within QTCreator.



  • @leinad said in Debugger Not showing attribute values:

    So for some reason adding a statement and then later removing it, clears it up.

    Since you know that in itself cannot change anything, don't you think it does indicate there was some build artefact left around? I don't know what Clean Project ... actually does, I just delete all the files in the build directory. Anyway it's solved now.


Log in to reply