I’m following WWDC session 412 – Debugging in Xcode. There is a demo there about creating custom LLDB summaries for your own classes.
I simply can’t get the summaries to show up.
By inserting print calls in the Python script I have been able to determine that:
- The script file is getting imported
- __lldb_init_module is never called
Any idea about what could prevent __lldb_init_module from being called? Is there a specific time when you need to import the script?
For me this worked by adding
to the
~/.lldbinitfile and restarting Xcode, or by setting a breakpoint in “main” and executing the import command in the debugger console.I tested it with a minimal custom description script:
and this is the view in the Xcode debugger window:
Note that you have to restart Xcode after changes to the script. It also seems that the output of “print” statements in the init method is not shown if the script is imported in the Xcode debugger console.