Debug Rust in Helix using lldb-vscode: display the contents of local string variables
2023-08-11
In a previous post titled debugging Rust in Helix,
I introduced a workaround using codelldb to address the visualization issue related to string variables within lldb-vscode
.
However, the usage of codelldb
presents some challenges:
- We have to start the server first using
codelldb --port 13000
- It is noticeably slow
- The Helix theme breaks when listing variables
In my quest for an improved debugging experience, I found rust-lldb, which impressively manages to display the contents of string variables:
How to debug Rust in Helix?
2023-08-10
Helix supports debugging Rust by default using lldb-vscode. However, there is an issue where string variables are displayed as memory addresses instead of their actual values:
Noticing that CodeLLDB natively supports visualization of most common Rust data types, I would like to give it a try.
Here’s the step-by-step process:
Download the CodeLLDB extension:
1$ cd ~/Downloads/ 2$ wget https://github.com/vadimcn/codelldb/releases/download/v1.9.2/codelldb-aarch64-darwin.vsix
Setup the extension:
1$ mkdir -p ~/.local 2$ set fish_user_paths /Users/quantong/.local/extension/adapter $fish_user_paths 3$ codelldb
If you encountered this error: