Thanks for the sample ~/.lldbinit script,
The type category enable lines are very necessary for printing hashmaps to work – when I originally posted this I thought the pretty print script was doing the heavy lifting on that, but I did more investigation and it seems like it might be really coming from zig.std
Just as a bit of troubleshooting help if anyone needs it, on MacOS if you see an error like this,
error: module importing failed: Traceback (most recent call last):
File “”, line 1, in
File “path/to/zig-0.15.2/tools/lldb_pretty_printers.py”, line 22
match struct_data.byte_order:
^
SyntaxError: invalid syntax
That probably means that it’s trying to use the old version of python that might come from doing xcode-select at some point.
If you installed llvm through homebrew (what I did), you can enable it like this:
export PATH=“$(brew --prefix llvm@21)/bin:$PATH”
You can verify what version of python you’re running for yourself by telling llvm to run a python script like this:
In ~/.lldbinit:
command script import path/to/lldb_version_check.py
In lldb_version_check.py:
import sys
print('python version is', sys.version)
print('python path is', sys.executable)
If it’s configured right, that script should output something like this:
python version is 3.14.3 (main, Feb 3 2026, 15:32:20) [Clang 17.0.0 (clang-1700.6.3.2)]
python path is /opt/homebrew/opt/llvm/bin/lldb
But if you see this output, it’s the old version of python:
python version is 3.9.6 (default, Dec 2 2025, 07:27:58)
[Clang 17.0.0 (clang-1700.6.3.2)]
python path is /Library/Developer/CommandLineTools/usr/bin/lldb
Just figured I’d share that, in case people are reading this that don’t have a strong python background.
Also another tip, since there doesn’t seem to be a way to just get a particular key (or a range of keys) in lldb, you might find that the output from p is truncated.
I don’t know if there’s a better way to do this, but I put this in my ~/.lldbinit. Note that the set set is correct, it’s not a typo.
set set target.max-string-summary-length 100000
set set target.max-children-count 10000