Skip to content
Lei Xu edited this page May 6, 2023 · 2 revisions

LLDB config

# ~/.lldbinit
settings set stop-line-count-before 15
settings set stop-line-count-after 15
settings set target.load-cwd-lldbinit true
# /path/to/lance/python/.lldbinit
env DYLD_LIBRARY_PATH=/path/to/thirdparty/dist/lib:${DYLD_LIBRARY_PATH}

Debug lance in Python

$ lldb ./venv/bin/python
(lldb) r script.py 

Performance Debugging

First, install flamegraph

cargo install flamegraph

Install linux tools (pperf) on Ubuntu

sudo apt install linux-tools-common linux-tools-generic linux-tools-`uname -r`
sudo sh -c "echo -1 >  /proc/sys/kernel/perf_event_paranoid"
flamegraph -p <PID>
Clone this wiki locally