godot/misc/scripts
Mitten Orvan 829c33aed1
Create a GDB pretty printing file for String, StringName, and Vector
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.
2024-05-11 12:33:35 +02:00
..
check_ci_log.py
clang_tidy.sh
copyright_headers.py
dotnet_format.py CI: Overhaul static checks to use pre-commit 2024-05-08 10:30:24 -05:00
file_format.py CI: Overhaul static checks to use pre-commit 2024-05-08 10:30:24 -05:00
gitignore_check.sh
godot_gdb_pretty_print.py Create a GDB pretty printing file for String, StringName, and Vector 2024-05-11 12:33:35 +02:00
header_guards.py CI: Overhaul static checks to use pre-commit 2024-05-08 10:30:24 -05:00
install_d3d12_sdk_windows.py
install_vulkan_sdk_macos.sh
make_icons.sh
make_tarball.sh
mypy.ini
validate_extension_api.sh