godot
godot copied to clipboard
Misc: Add lldb pretty print script
Supports:
- String (summary string in the format
"hello world") - StringName (summary string in the format
&"hello world" - List (synthetic children for indexed children access + summary string in the format
2 items - HashMap (synthetic children for indexed children access (to the KeyValues) + summary string in the format
2 items) - Vector (synthetic children for indexed children access + summary string in the format
2 items)
See also ~~https://github.com/nikitalita/lldb-qt-formatters~~ from @nikitalita
https://github.com/nikitalita/lldb-qt-formatters/blob/godot/GodotFormatters.py
https://github.com/nikitalita/lldb-qt-formatters/blob/godot/GodotFormatters.py
That's definitely more elaborate then what I came up with. I still think a minimal pretty printer in our repo would be nice, but if this is closed in favor of existing stuff we should link to it in some way.
I would prefer a Godot Engine integration because this is not a trivial script to write for lldb support.
See also ~https://github.com/nikitalita/lldb-qt-formatters~ from @nikitalita
https://github.com/nikitalita/lldb-qt-formatters/blob/godot/GodotFormatters.py
That's actually old, the most current one resides here: https://github.com/nikitalita/GodotFormatters
I should note that this isn't quite ready for prime-time. I keep getting hangs when loading a frame that has a bunch of complex variables, and I am unable to track it down due to the lack of debugging for lldb scripts. If anyone wants to take this and run with it, be my guest.