mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 19:42:43 +00:00
829c33aed1
GDB supports custom pretty-printers implemented in Python. When debugging Godot, checking the values of Strings and StringNames in the debugger was very inconvenient as the data is fairly deep in the structure. This makes the values immediately visible. The custom pretty printer can be taken into use manually by calling `source misc/scripts/godot_gdb_pretty_print.py` in the GDB console. In VS code, it can be activated by default by adding the source command to the `setupCommands` of the configuration in launch.json. Like this: ```json // launch.json { "configurations": [ { "name": "C/C++: debug, "type": "cppdbg", ... "MIMode": "gdb", "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true }, { "description": "Load custom pretty-printers for Godot types.", "text": "source ${workspaceRoot}/misc/scripts/godot_gdb_pretty_print.py" } ], "miDebuggerPath": "gdb" } ], "version": "2.0.0" } ``` Extended the pretty-printer python script to support Vectors. The printer needs to be uncomfortably aware of CowData implementation details, but I don't think there is any way around that. |
||
---|---|---|
.. | ||
dist | ||
error_suppressions | ||
extension_api_validation | ||
msvs | ||
scripts |