Skip to content

Adapter catalog

Built-in adapters

id Language Install with Verify with Transport
codelldb Rust, C, C++ CodeLLDB release or Mason codelldb --version TCP
dlv Go go install github.com/go-delve/delve/cmd/dlv@latest dlv version TCP
debugpy Python pip install debugpy into the project interpreter python3 -m debugpy --version stdio
php PHP make build — ships with Bugsaur command -v php-dbgp-adapter stdio

The built-in catalog

Exactly as Bugsaur defines it:

[adapters.dlv]
id = "dlv"
command = "dlv"
args = ["dap", "--check-go-version=false"]
tcp_argument = "--listen={host}:{port}"
transport = { tcp = { host = "127.0.0.1" } }

[adapters.dlv.build]
command = "go"
args = ["build", "-gcflags=all=-N -l", "-o", "{out}", "{program}"]

[adapters.codelldb]
id = "codelldb"
command = "codelldb"
tcp_argument = "--port={port}"
transport = { tcp = { host = "127.0.0.1" } }

[adapters.debugpy]
id = "debugpy"
command = "python3"
args = ["-m", "debugpy.adapter"]
transport = "stdio"

[adapters.php]
id = "php"
command = "php-dbgp-adapter"
transport = "stdio"

[adapters.php.launch_arguments]
port = 9003
sessionMode = "server"

dlv is the only entry with a build, and php the only one with default launch_arguments.

Where the catalog is read from

The built-in catalog is always the base. On top of it:

Order Path
1 $XDG_CONFIG_HOME/bugsaur/adapters.toml
2 $HOME/.config/bugsaur/adapters.toml

--adapters <path> replaces that search with the single named file. A missing file is not an error; an unreadable one is a warning and is skipped.

Entries merge by id: an existing id replaces the built-in entry, a new one adds an adapter.

Catalog entry fields

Key Type Description
id string the id profiles refer to
command string the executable, resolved through PATH
args array of strings its arguments
cwd string the adapter process's working directory
env table of strings the adapter process's environment
transport "stdio" or a tcp table how Bugsaur talks to it
tcp_argument string where a TCP adapter should listen; {host} and {port} substituted
launch_timeout integer seconds for launch / attach and configurationDone responses
launch_arguments table defaults for the DAP request body
build table command and args, with {out} and {program}

Overriding per profile

Profile field Effect
adapter_command use this executable instead of the catalog's command
launch_timeout override the catalog's timeout
build override the catalog's build
launch_arguments override the catalog's defaults, key by key

Language and program shape

Adapter program is Built by Bugsaur
codelldb a compiled binary no
dlv a package directory yes
debugpy a script nothing to build
php the project directory nothing to build

Adding one

See Debug adapters → Custom adapters.