Qt VS Code Extensions Manual Tests Debugger: Difference between revisions
No edit summary |
No edit summary |
||
Line 50: | Line 50: | ||
''This is a work in progress, need to use the latest natvis files from https://github.com/narnaud/natvis4qt (to be moved to qt-labs/vs-debugtools [https://bugreports.qt.io/browse/QTVSADDINBUG-1310/ QTVSADDINBUG-1310])'' | ''This is a work in progress, need to use the latest natvis files from https://github.com/narnaud/natvis4qt (to be moved to qt-labs/vs-debugtools [https://bugreports.qt.io/browse/QTVSADDINBUG-1310/ QTVSADDINBUG-1310])'' | ||
{| class="wikitable" | {| class="wikitable" | ||
!Qt6 Tested type | !Qt6 Tested type | ||
!Variable Name | |||
!Expectation | |||
!Result | !Result | ||
|+ | |+ | ||
| | |Core Types | ||
| | |+ | ||
|QByteArray | |||
|qByteArray | |||
| | |||
| | |||
|+ | |||
|QChar | |||
|qChar | |||
| | |||
| | |||
|+ | |||
|QDate | |||
|qDate | |||
| | |||
| | |||
|+ | |||
|QDate with currentDateTime() | |||
|qDateTimeLocal | |||
| | |||
| | | | ||
|+ | |+ | ||
| | |QDate with currentDateTimeUtc() | ||
|qDateTimeUtc | |||
| | |||
| | |||
|+ | |||
|QDate with currentDateTimeUtc() Asia | |||
|qDateTimeBrunei | |||
| | |||
| | |||
|+ | |||
|QDate with currentDateTimeUtc() South Pole | |||
|qDateTimeSouthPole | |||
| | |||
| | |||
| | |||
|+ | |||
|QDate with currentDateTimeUtc() Canada | |||
|qDateTimeYukon | |||
| | |||
| | |||
|+ | |||
|QDate with currentDateTimeUtc() Pacific | |||
|qDateTimeMarquesas | |||
| | |||
| | | | ||
|+ | |+ | ||
| | |QDate with currentDateTimeUtc() Troll | ||
| | |qDateTimeShouldFail | ||
| | | | ||
| | |||
|+ | |+ | ||
| | |QDate with currentDateTimeUtc() 12 * 3600 + 34 * 60 + 56 | ||
| | |qDateTimeSecOffset | ||
| | | | ||
| | |||
|+ | |+ | ||
| | |QDate default | ||
| | |qDateTimeDefault | ||
| | | | ||
| | |||
|+ | |+ | ||
| | |QDir | ||
| | |qDir | ||
| | | | ||
| | |||
|+ | |+ | ||
| | |QFile | ||
| | |qFile | ||
| | | | ||
| | |||
|+ | |+ | ||
| | |QFileInfo | ||
| | |qFileInfo | ||
| | | | ||
| | |||
|+ | |+ | ||
| | |enum SelectionFlags | ||
|qFlags | |||
| | |||
| | | | ||
|+ | |+ | ||
| | |QJsonDocument | ||
|qJsonDocument | |||
| | |||
| | | | ||
|+ | |+ | ||
|QLine | |QLine | ||
|qLine | |||
| | |||
| | | | ||
|+ | |+ | ||
| | |QPoint | ||
|qPoint | |||
| | |||
| | | | ||
|+ | |+ | ||
| | |QPointF | ||
| | |qPointF | ||
| | | | ||
| | |||
|+ | |+ | ||
| | |QRect | ||
| | |qRect | ||
| | | | ||
| | |||
|+ | |+ | ||
| | |QRectF | ||
| | |qRectF | ||
| | | | ||
| | |||
|+ | |+ | ||
| | |QSize | ||
| | |qSize | ||
| | | | ||
| | |||
|+ | |+ | ||
| | |QSizeF | ||
| | |qSizeF | ||
| | | | ||
| | |||
|+ | |+ | ||
| | |QString | ||
| | |qString | ||
| | | | ||
| | | | ||
|+ | |+ | ||
| | |QStringView | ||
|qStringView | |||
| | | | ||
| | | | ||
|+ | |+ | ||
|QTime | |QTime | ||
|qTime | |||
| | | | ||
|[https://bugreports.qt.io/browse/VSCODEEXT-160?filter=27222/ VSCODEEXT-160] | |[https://bugreports.qt.io/browse/VSCODEEXT-160?filter=27222/ VSCODEEXT-160] | ||
|+ | |+ | ||
| | |QUrl | ||
|qUrl | |||
| | | | ||
| | |[https://bugreports.qt.io/browse/VSCODEEXT-159?filter=27222/ VSCODEEXT-159] | ||
|+ | |+ | ||
|QUuid | |||
| | | | ||
| | | | ||
|[https://bugreports.qt.io/browse/VSCODEEXT-161?filter=27222/ VSCODEEXT-161] | |||
|+ | |||
|QBasicAtomicInteger | |||
|Problem or adapt expectation | |||
|Type is QAtomicOps<int> instead of QBasicAtomicInteger<int> | |||
In Raw View value type is <int> instead of std::atomic<int> | |||
|+ | |+ | ||
|QBasicAtomicPointer | |||
|Adapt expectation? | |||
|Raw View type is QBasicAtomicPointer<void>::AtomicType instead of QBasicAtomicPointer<void> | |||
|+ | |||
|QChar QChar_Latin1 | |||
|Adapt expectations. Problem? | |||
|Raw View is not as expected. No latin 1 nor unicode, only ucs. The type and value of ucs are as expected. Need to check those of latin 1 and unicode though. | |||
|+ | |||
|QChar QChar_non_Latin1 | |||
|Adapt expectations. | |||
|See QChar_Latin1, values are not as expected | |||
|+ | |||
|QPair<int, int> | |||
| | | | ||
| | |type show is QPair<int, int> instead of expected std::pair<int,int> | ||
} | |||
Revision as of 15:33, 7 April 2025
This is about catching the Qt types not properly understood by the debugger.
Found problems are to be reported in https://bugreports.qt.io/browse/VSCODEEXT-154?filter=27222
Auto test is meant to replace the manual testing
Pre-requisit | Result | Annotation |
---|---|---|
Have VS code installed (https://code.visualstudio.com/docs/setup/setup-overview) | ||
Have a Qt installation (https://account.qt.io/s/downloads) | ||
Have the Qt C++ Extension Pack installed, a Qt installation registered |
The natvis files and the related test files are located in the qt-labs/vs-debugtools repo. This is the debugging_helpers vscodeext submodule.
To use the latest vs-debugtools, use a local vscodeext. To set up everything, run:
npm ci
git submodule update --init --remote --recursive
npm run prepareNatvisFiles
npm run all_dev
To access the test files, open debugging_helper and make sure .vscode/setting.json has:
"cmake.useCMakePresets": "never"
since CMakePresets are not supported and block Qt kit visibility (ongoing).
Select a Qt kit.
In test-app/main.cpp, place a break point at the return call.
Check that the debugger output is as expected.
This is a work in progress, need to use the latest natvis files from https://github.com/narnaud/natvis4qt (to be moved to qt-labs/vs-debugtools QTVSADDINBUG-1310)
Qt6 Tested type | Variable Name | Expectation | Result | |
---|---|---|---|---|
Core Types | ||||
QByteArray | qByteArray | |||
QChar | qChar | |||
QDate | qDate | |||
QDate with currentDateTime() | qDateTimeLocal | |||
QDate with currentDateTimeUtc() | qDateTimeUtc | |||
QDate with currentDateTimeUtc() Asia | qDateTimeBrunei | |||
QDate with currentDateTimeUtc() South Pole | qDateTimeSouthPole | |||
QDate with currentDateTimeUtc() Canada | qDateTimeYukon | |||
QDate with currentDateTimeUtc() Pacific | qDateTimeMarquesas | |||
QDate with currentDateTimeUtc() Troll | qDateTimeShouldFail | |||
QDate with currentDateTimeUtc() 12 * 3600 + 34 * 60 + 56 | qDateTimeSecOffset | |||
QDate default | qDateTimeDefault | |||
QDir | qDir | |||
QFile | qFile | |||
QFileInfo | qFileInfo | |||
enum SelectionFlags | qFlags | |||
QJsonDocument | qJsonDocument | |||
QLine | qLine | |||
QPoint | qPoint | |||
QPointF | qPointF | |||
QRect | qRect | |||
QRectF | qRectF | |||
QSize | qSize | |||
QSizeF | qSizeF | |||
QString | qString | |||
QStringView | qStringView | |||
QTime | qTime | VSCODEEXT-160 | ||
QUrl | qUrl | VSCODEEXT-159 | ||
QUuid | VSCODEEXT-161 | |||
QBasicAtomicInteger | Problem or adapt expectation | Type is QAtomicOps<int> instead of QBasicAtomicInteger<int>
In Raw View value type is <int> instead of std::atomic<int> |
||
QBasicAtomicPointer | Adapt expectation? | Raw View type is QBasicAtomicPointer<void>::AtomicType instead of QBasicAtomicPointer<void> | ||
QChar QChar_Latin1 | Adapt expectations. Problem? | Raw View is not as expected. No latin 1 nor unicode, only ucs. The type and value of ucs are as expected. Need to check those of latin 1 and unicode though. | ||
QChar QChar_non_Latin1 | Adapt expectations. | See QChar_Latin1, values are not as expected | ||
QPair<int, int> | type show is QPair<int, int> instead of expected std::pair<int,int>
} |