Open ZachIsAGardner opened 2 years ago
Built-In Types
Vector Built-In Types
Engine Built-In Types
Container Built-In Types
Question about this enhancement: I see that Dictionary is unchecked.
Is the lack of this enhancement why doing some_dictionary.keys()
in the debug console in vscode reports null
?
Is the lack of this enhancement why doing
some_dictionary.keys()
in the debug console in vscode reportsnull
?
I am not involved with this PR but I doubt so, since it runs a function and shows the return value.
Godot version
3.4.4.stable
VS Code version
1.68.1
Godot Tools VS Code extension version
1.3.1
System information
Windows 10
Problem statement
It's not possible to do various operations in the Debug Console after hitting a breakpoint.
See here for all the different operations possible: https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_basics.html
For example if you hit a breakpoint in a Node2D script you might want to change the position of that Node2D.
So in the Debug Console you would type something like:
You can set some values through the Inspector, but some types don't work. See: https://github.com/godotengine/godot-vscode-plugin/issues/383
This proceeds this issue: https://github.com/godotengine/godot-vscode-plugin/issues/381 Of which I have a proposed PR for: https://github.com/godotengine/godot-vscode-plugin/pull/387
Proposed solution
Using the existing infrastructure communicating between the extension and Godot we can implement various operations.
In VS Code if you run:
That will go over to the Godot Engine and hit the following function in script_debugger_remote.cpp:
So it's merely a matter of understanding how to format the values properly for all the different types.