debugger: Support passing custom arguments to debug adapters (#33251)

Custom arguments replace any arguments that we normally pass to the DAP.
For interpreted languages, they are passed to the interpreter after the
DAP path or module. They can be combined with a custom binary, or you
can omit `dap.binary` and just customize the arguments to the DAPs we
download.

This doesn't take care of updating the extension API to support custom
arguments.

Release Notes:

- debugger: Implemented support for passing custom arguments to a debug
adapter binary using the `dap.args` setting.
- debugger: Fixed not being able to use the `dap` setting in
`.zed/settings.json`.
This commit is contained in:
Cole Miller authored and GitHub committed 2025-06-23 17:06:48 +00:00
1 parent 476befda8f
commit d34c6e92f2
11 files changed
+154 -54

No files matched your search

+2
View File
@@ -344,6 +344,7 @@ pub trait DebugAdapter: 'static + Send + Sync {
delegate: &Arc<dyn DapDelegate>,
config: &DebugTaskDefinition,
user_installed_path: Option<PathBuf>,
user_args: Option<Vec<String>>,
cx: &mut AsyncApp,
) -> Result<DebugAdapterBinary>;
@@ -434,6 +435,7 @@ impl DebugAdapter for FakeAdapter {
_: &Arc<dyn DapDelegate>,
task_definition: &DebugTaskDefinition,
_: Option<PathBuf>,
_: Option<Vec<String>>,
_: &mut AsyncApp,
) -> Result<DebugAdapterBinary> {
Ok(DebugAdapterBinary {