Debugging Qt with VS 2015 IDE - Watches on Qt containers



  • I'm testing a transition to VS 2015. As an in-between step, I still use the VS 2010 compiler, but the VS 2015 IDE.

    Now, when I debug Qt applications, watches on Qt containers no longer display the values in any readable way.

    Any ideas what I could try?


  • Moderators

    Visual Studio 2010 debugger used older format of visualizations, placed in a file <VS install dir>\\Common7\Packages\Debugger\autoexp.dat. Open it in some text editor and check if Qt types are there.
    If not then install latest Qt add-in. It should update that file for you. Note that there is no add-in for VS2015 from Qt Project yet, but you want to use VS2010 toolchain so install it for that version.



  • @Chris-Kawa
    Thank you for that pointer. I have VS 2010 installed as well, and there it works. VS 2010 and 2015 have separate autoexp.dat files, so the addin would likely only install to the file relevant for VS 2010.
    I have tried to manually transfer the lines to the VS 2015 autoexp file. Things like QPointF work, but things like QList dont.

    Further ideas?


  • Moderators

    VS2015 debugger uses .natvis files now, not autoexp.dat.
    Which debugger is used in your scenario? The one from 2010 or 2015?



  • @Chris-Kawa
    Good question. I use "Local Windows debugger", I have to find out which one that is. Give that I installed VS 2015 after VS 2010, I assume that VS 2015 is used.

    And thanks for the pointer to .natvis file. I'll research that.



  • So I tried to add a .natvis file from The IDE debug helpers page. Neither of the methods specified on this page did the trick, so I assume the VS 2012 natvis file does not work properly on VS 2015.

    Guess I'll have to revert to VS 2010 for the time being. Thanks for your help!



  • Solution: I added a Qt6 natvis file (which is added by the extension "Qt package" anyway), but had no .natvis file for debugging Qt5 containers.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.