How to make Visual Studio evaluate Qt expressions?
Moved
Unsolved
Qt Creator and other tools
-
Whatever Qt expression i try to evaluate while debugging on Visual Studio 2022 doesnt work, for example:
- Conditional breakpoints with Qt expressions doesnt work.
- Any Qt expression on watch window always: Function QWidget::height has no address, possibly due to compiler optimizations.
I'm on Debug mode, i also tried:
C/C++ > Optimization -> Optimization -> Disabled /Od
And also all options here:
I'm using Qt 6.6, VS22 latest version available today.
-
-
I am not entirely sure what your problem is in this case. However, for general use of Qt in VS: Do you have the natvis debug helpers installed (https://wiki.qt.io/IDE_Debug_Helpers)?
What might be the case with your problem is that you don't have debug symbols for Qt installed. My guess is that maybe you need to install the Qt source using the online installer. Though I'm not entirely sure about that.