Skip to content

Debugger Configurations

Alexis Kalabura edited this page Jul 5, 2022 · 27 revisions

This page can provide additional debugger configurations beyond the ones shipped by default in Helix.

Install Debuggers

Codelldb GitHub release (latest by date)

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 bin

Will 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_adapter

Delete 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/codelldb

Test: codelldb -h

Configure Debuggers

Rust (with codelldb)

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 = true

Test with: debug-start binary target/debug/zellij, for example. Status: start/stop debugging works, breakpoints work

Clone this wiki locally