godot icon indicating copy to clipboard operation
godot copied to clipboard

Misc: Add lldb pretty print script

Open HolonProduction opened this issue 1 year ago • 3 comments

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)

HolonProduction avatar Sep 21 '24 16:09 HolonProduction

See also ~~https://github.com/nikitalita/lldb-qt-formatters~~ from @nikitalita

https://github.com/nikitalita/lldb-qt-formatters/blob/godot/GodotFormatters.py

fire avatar Sep 21 '24 17:09 fire

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.

HolonProduction avatar Sep 22 '24 10:09 HolonProduction

I would prefer a Godot Engine integration because this is not a trivial script to write for lldb support.

fire avatar Sep 23 '24 00:09 fire

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.

nikitalita avatar Sep 29 '24 18:09 nikitalita