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 2025-06-23 13:06:48 -04:00 committed by GitHub
parent a067c16c82
commit c9bd409732
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 154 additions and 54 deletions

View file

@ -88,6 +88,8 @@ impl DebugAdapter for ExtensionDapAdapter {
delegate: &Arc<dyn DapDelegate>,
config: &DebugTaskDefinition,
user_installed_path: Option<PathBuf>,
// TODO support user args in the extension API
_user_args: Option<Vec<String>>,
_cx: &mut AsyncApp,
) -> Result<DebugAdapterBinary> {
self.extension