In the debug of godot-cpp gdextension I cannot see content of data structures like Array and String and etc. Anyone knows how to fix it?
Either compile debug version, or load the symbol database file (.pdb) which is probably in the build output maybe?
Debug symbols of what? gdextension? godot-cpp? engine?
Does it work for you?
I would say all three. I do use a debugger from time to time, but haven’t yet with Godot.
But looking at your image a little harder. If it really is a string, it kind of looks like it’s trying to interpret a utf-16 character as a utf-8 character.
It could just be junk data that coincidentally ends up being Japanese.
Its not a string. Its a TypedArray of stuctures. something like TypedArray<MyStruct>
I can see content of std collections and etc. But not Godot.
Is that a typed Godot::Array? And if so Is MyStruct derived from the Variant class?
Yes its typed Godot::Array. No its not derrived from Variant. And it doesn’t matter what it is, a struct or a Godot::String, or just Array of int. Or untyped godot::Array. Behavior is the same. This just one of examples. I’m using Visual Code.
I can find libgodot-cpp.windows.template_debug.dev.x86_64.lib
but I cannot find libgodot-cpp pdb
in the godot-cpp folders.
Usually if you have a debug version the symbols will be directly readable in the elf.
Btw, you could use Godot template class LocalVector (core/templates/local_vector.h) for your custom struct. As standard c++ types are not compatible with Godot::Array, as it’s interface requires Variant types. (See a_star_grid_2d.cpp and it’s use of Point struct)
If you still need to use Godot::Array you will need to compile the engine with your new variant data structure integrated.
It is not exposed to godot-cpp gdextension. I believe you ate talking for case if one develops a module or writes his code in engine.
I guess I’m becoming confused. TypdedArray would imply coding in godot-cpp. And your image shows a Godot::Array reference with opaque data reference.
If you are using someone else’s gdextension. You could try and get the symbols from the debug dll. I don’t use visual studio code much for debugging, but here is their setup for the project.
godot-cpp is official gdextension library that does not require you write cpp game in engine. You can write it as a dll. GitHub - godotengine/godot-cpp: C++ bindings for the Godot script API
And it has no exposed containers like List and LocalVector taht do exist in engine code.
It does have the template vector classes under include/godot_cpp/templates
And thanks, I have never seen that. I’ve only worked with modules.
Idk how i missed them, i’ve checked several tines lol.
I’m seeing this same issue while debugging a gdextension in Visual Studio 2022. The engine, godot-cpp, and gdextension have all been built as template_debug.dev (dev_build=yes target=template_debug) and debug symbols appear to be loaded properly. @YanDaik Did you ever find a solution?
No, don’t have a solution.