This Rust debugging tool is a game changer, thanks LLM

11.23.2024

I love debuggers, and I love Rust, so I find myself using ‘rust-lldb’ often while working on my projects. I think it’s nice to reach for the debugger first thing rather than fumbling around and making a bunch of print statements that need to be deleted. However, I have always found it slightly annoying when working in a larger project, because you have either copy past to find the executable you need out of a bunch named something like package-module-test-name-12384q9ad8sf92310efy0wd9c. When a test is failing, the workflow is often cargo test --no-run followed by copy from stdout or worse, grepping the target directory for the right one to debug. Then I can launch lldb. Good thing making plugins is so easy. Easy enough, it turns out, that all I had to do was as Perplexity and I got out an excellent tool the first try!

Now all I need to do is

cargo lldb-test failing_test --test test_file

Check it out.

I just fixed a bug using this, It’s so awesome.