godot-cpp.natvis debug visualizers#1977
Conversation
…ctionary natvis entries
|
Resolves godotengine/godot-proposals#10605 |
dsnopek
left a comment
There was a problem hiding this comment.
Thanks!
I haven't tested, because I'm not a Rider or MSVC user. However, in general, I'm in support of including a .natvis file in godot-cpp.
Overall, the comments here seem quite verbose and not super useful. If they can be trimmed down to the essentials, that would be nice.
This doesn't include all the same types that are in godot.natvis - is the idea that folks will use both godot.natvis and godot-cpp.natvis together, and those types are covered by the godot.natvis?
|
Thank you for the comments!
To my understanding it is not possible to directly use godotengine types in a gdextension, only their wrapped |
Yes, but godot-cpp has it's own version of many of the types, including the containers like All of these types are represented in godot.natvis, but the godot-cpp.natvis in this PR only has:
What aren't all the types that are in godot.natvis included in godot-cpp.natvis too? |
|
You are right that we'd need to add those ~20 remaining types. I would be happy to continue working on adding more types, but I can't dedicate the whole week in a row to it. |
The original
godot.natvisexists in thehttps://github.com/godotengine/godot/blob/master/platform/windows/godot.natvis
and only supported
godot::Stringand thegodot::StringNamewas added recently in godotengine/godot#116955Discussed in https://chat.godotengine.org/channel/gdextension?msg=mCgwe4cCkP3b43TjY
We realized there is no point in keeping godot-cpp type in the
godot.natvisin the godotengine repo. All the types in godot-cpp are not the same - godot-cpp wraps the original godotengine types.Support for
godot::Array,godot::Dictionaryandgodot::Variantwas added in this PR.I have only tested the PR with JetBrians Rider. Just having the file, where it is located now is enough to automatically be used for debugging.
Related JetBrains tickets: https://youtrack.jetbrains.com/issue/RIDER-131718/Windows-Debug-GdExtension-from-Rider-usability, https://youtrack.jetbrains.com/issue/CPP-35297/Natvis-support-on-macOS-Linux-with-lldb, https://github.com/JetBrains/godot-support/wiki/Developing-godot%E2%80%90cpp.natvis