tonka3000 / vscode-qt-tools

Qt tools extension for Visual Studio Code
MIT License
41 stars 10 forks source link

QString: No DisplayString and StringView view on Mac #44

Open gordody opened 3 years ago

gordody commented 3 years ago

I'm not getting the DisplayString nor the StringView in my Watch window, only a {...} using both the default and the one from MS. The "size" and "referenced" show up on expansion.

VSCode info: Version: 1.54.1 Commit: f30a9b73e8ffc278e71575118b6bf568f04587c8 Date: 2021-03-04T22:42:18.719Z Electron: 11.3.0 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Darwin x64 19.6.0

tonka3000 commented 3 years ago

Which natvis file do you use, the default one?

gordody commented 3 years ago

Both...

-- Gyuri

On Tue, Mar 16, 2021, 14:33 Michael Aigner @.***> wrote:

Which natvis file do you use, the default one?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tonka3000/vscode-qt-tools/issues/44#issuecomment-800620904, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF3FUTTSY63LZVERLCSYN5DTD7FDJANCNFSM4Y4LCREA .

tonka3000 commented 3 years ago

Both

The default one and which other one?

gordody commented 3 years ago

The other one is the Microsoft one you link to in the docs.

On Apr 2, 2021, at 9:53 AM, Michael Aigner @.***> wrote:

Both

The default one and which other one?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tonka3000/vscode-qt-tools/issues/44#issuecomment-812613557, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF3FUTXQCMPBJBUX5GEYTXTTGXY77ANCNFSM4Y4LCREA.

Merrit commented 2 years ago

Also struggling with this on Linux. Hovering over the variable in the editor shows me:

[Visualized View]:Explicit refresh required for visualized expressions

image

In debug panel all that shows is the size:

image

vansoest commented 1 year ago

Same problem like @Merrit on GNU/Linux with QT5. Visualizer file from https://github.com/aambrosano/qt-natvis/blob/master/qt5.natvis.xml

Version: 1.68.1
Commit: 30d9c6cd9483b2cc586687151bcbcd635f373630
Date: 2022-06-16T00:18:08.407Z
Electron: 17.4.7
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: 9.8.177.13-electron.0
OS: Linux x64 5.15.65-1-MANJARO
atar-axis commented 1 year ago

anything new here? having the same issue unfortunately

reporter123 commented 6 months ago

This extension when installed on my setup refused to let me change the natvis setting. If I tried the change automatically reset to the extensions built-in and very limited one Only removing the extension entirely resolved the string display issue because that's the only way I could get back to the Microsoft one or in my case remove the natvis setting entirely.

tonka3000 commented 6 months ago

@reporter123 You can set qttools.injectNatvisFile to false to disable the auto-injection like mentioned in the readme.

Which Microsoft natvis file do you refer to which contains a QString?

Merrit commented 6 months ago

I don't know about Mac, but on Linux setting up pretty printers helped me to enable variable visualization:

https://microhobby.com.br/blog/2023/08/13/debugging-qt-applications-on-vs-code-with-debug-helpers/

reporter123 commented 6 months ago

@tonka3000 I maybe a little confused there. I do remember looking your natvis file however and trying figure out what was causing the display issue. I maybe thinking of something else. Thanks for pointing out the setting as well. @Merrit GDB on linux has pretty printers that can be used as a replacement. lldb default on MacOS doesn't have any maintained equivalent although it is technically possible to write them.

Ashark commented 2 months ago

I can confirm that in Linux, even with the official qt6.natvis.xml, the QString visualization does not work. I made an mr with clarifications regarding natvis: #95