-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Debugger Configurations
This page can provide additional debugger configurations beyond the ones shipped by default in Helix.
linux (tested in ubuntu):
Access your user folder.
cd ~Check the architecture of the cpu to later download the correct version of codelldb.
lscpu | grep -oP 'Architecture:\s*\K.+'create a folder named bin and access it.
mkdir bin && cd binWill download codelldb through curl. ( .vsix can be opened as .zip ).
sudo curl -L "https://github.com/vadimcn/vscode-lldb/releases/download/v1.7.0/codelldb-x86_64-linux.vsix" -o "codelldb-x86_64-linux.zip"Unzip only the necessary folders, in this case extension/adapter and extension/lldb.
unzip "codelldb-x86_64-linux.zip" "extension/adapter/*" "extension/lldb/*"Rename the extension/ folder to codelldb_adapter/
mv extension/ codelldb_adapterDelete the unneeded codelldb-x86_64-linux.zip at this time.
sudo rm "codelldb-x86_64-linux.zip"Create the symlink from codelldb_adapter/adapter/codelldb to /usr/bin/codelldb and you're done.
ln codelldb_adapter/adapter/codelldb /usr/bin/codelldbTest: codelldb -h
Helix supports debugging Rust, by default, with lldb-vscode, which is part of llvm/lldb.
However, you can also use vscode-lldb's adapter named codelldb. (Note, the names can be confusing. vscode-lldb is a separate project from the aforementioned lldb-vscode.)
[[language]]
name = "rust"
[language.debugger]
command = "codelldb"
name = "codelldb"
port-arg = "--port {}"
transport = "tcp"
[[language.debugger.templates]]
name = "binary"
request = "launch"
[[language.debugger.templates.completion]]
completion = "filename"
name = "binary"
[language.debugger.templates.args]
program = "{0}"
runInTerminal = trueTest with: debug-start binary target/debug/zellij, for example.
Status: start/stop debugging works, breakpoints work
To simply install the default debugger that will work out of the box you need to:
- Install
LLVM.
The easiest way to do this is to use the pre-compiled binaries from the releases page: https://github.com/llvm/llvm-project/releases, for example, at the time of writing the latest version for Linux is: https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.2/clang+llvm-15.0.2-x86_64-unknown-linux-gnu-rhel86.tar.xz
- Unpack the entire directory somewhere accessible in your system
$PATHand create a symbolic link
If you have ~/bin in your path then unpack LLVM there and make a symlink to the lldb-vscode file that lives in the bin directory.

Now when you run the debugger in Helix select launch debug target and binary, then for example, to debug Rust, target/debug/ and the name of your executable.