Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QJson not working in VS 2019 with Qt 5.15 #2

Open
naubryGV opened this issue Mar 17, 2021 · 5 comments
Open

QJson not working in VS 2019 with Qt 5.15 #2

naubryGV opened this issue Mar 17, 2021 · 5 comments

Comments

@naubryGV
Copy link

When trying to visualize a QJsonDocument, or any QJson* object really, I'm not getting what I was expecting.
When empty:
image
When not empty:
image

please let me know if you want me to provide any more information.
I have tried to add the .natvis in either Program Files or My Documents VS folders but it wouldn't change a thing.

@naubryGV
Copy link
Author

Here is what I'm getting when displaying Error and Warning of Natvis files:

Natvis: C:\dev\QJson.natvis(4,4): Warning: Unable to load a visualized preview for type 'QJsonDocument' because the conditions of all <DisplayString> elements were false.
Natvis: C:\dev\QJson.natvis(55,6): Error: Side effects are not supported in this context.
    Error while evaluating '((Qt5Cored.dll!QtCbor::ByteData*)(tt()->data.data() + (int)(tt()->elements.at(n).value)))' in the context of type 'Qt5Cored.dll!QCborContainerPrivate'.
Natvis: C:\dev\QJson.natvis(46,57): Error: class "QCborContainerPrivate" has no member "byteDataAt"
    Error while evaluating 'container->byteDataAt(n)->str(),[container->byteDataAt(n)->len]na' in the context of type 'Qt5Cored.dll!QCborValue'.

hope this helps

@aleksey-nikolaev
Copy link
Owner

Thank you for using my natvis files. I assume you used the latest version of Qt. As I know, there are a lot of changes in Qt QJson. I don't use Qt products at the moment, so I can't help you, sorry.

@naubryGV naubryGV changed the title QJson not working in VS 2019 QJson not working in VS 2019 with Qt 5.15 Oct 20, 2021
@RichardTea
Copy link

RichardTea commented Oct 17, 2022

More detail, though I do not know what it means:

Natvis: QJson.natvis(54,6): Error: Side effects are not supported in this context.
    Error while evaluating '((Qt5Cored.dll!QtCbor::ByteData*)(tt()->data.data() + (int)(tt()->elements.at(n).value)))'

@ssproessig-thales
Copy link

@RichardTea do you have the .pdb files installed as well? Without them I think it's impossible for natvis to resolve the internals...

@Yourbee
Copy link

Yourbee commented Oct 12, 2023

@RichardTea do you have the .pdb files installed as well? Without them I think it's impossible for natvis to resolve the internals...

The nativs file provided by the visual studio qt plug-in works normally. QString can be visualized, but the added QJsonObject does not. Is this a problem with the pdb file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants