From 5ac866dbc9622b9966a14b0319580ca53e87cac0 Mon Sep 17 00:00:00 2001 From: versecafe <147033096+versecafe@users.noreply.github.com> Date: Tue, 26 Aug 2025 11:25:29 -0700 Subject: [PATCH] debuggee all over the place? --- crates/dap_adapters/src/codelldb.rs | 4 ++-- crates/extension_api/src/extension_api.rs | 2 +- crates/project/src/debugger/dap_command.rs | 16 ++++++++-------- crates/project/src/debugger/memory.rs | 6 +++--- crates/project/src/debugger/session.rs | 14 +++++++------- crates/proto/proto/debugger.proto | 4 ++-- crates/task/src/debug_format.rs | 4 ++-- docs/src/extensions/debugger-extensions.md | 2 +- docs/src/languages/go.md | 2 +- 9 files changed, 27 insertions(+), 27 deletions(-) diff --git a/crates/dap_adapters/src/codelldb.rs b/crates/dap_adapters/src/codelldb.rs index 6615d2e2a3..f206d529bb 100644 --- a/crates/dap_adapters/src/codelldb.rs +++ b/crates/dap_adapters/src/codelldb.rs @@ -208,7 +208,7 @@ impl DebugAdapter for CodeLldbDebugAdapter { }, "processCreateCommands": { "type": "array", - "description": "Commands that create the debuggee process", + "description": "Commands that create the debugger process", "items": { "type": "string" } @@ -222,7 +222,7 @@ impl DebugAdapter for CodeLldbDebugAdapter { }, "preTerminateCommands": { "type": "array", - "description": "Commands executed just before the debuggee is terminated or disconnected from", + "description": "Commands executed just before the debugger is terminated or disconnected from", "items": { "type": "string" } diff --git a/crates/extension_api/src/extension_api.rs b/crates/extension_api/src/extension_api.rs index 72327179ee..733dbd5b7c 100644 --- a/crates/extension_api/src/extension_api.rs +++ b/crates/extension_api/src/extension_api.rs @@ -205,7 +205,7 @@ pub trait Extension: Send + Sync { Err("`get_dap_binary` not implemented".to_string()) } - /// Determines whether the specified adapter configuration should *launch* a new debuggee process + /// Determines whether the specified adapter configuration should *launch* a new debugger process /// or *attach* to an existing one. This function should not perform any further validation (outside of determining the kind of a request). /// This function should return an error when the kind cannot be determined (rather than fall back to a known default). fn dap_request_kind( diff --git a/crates/project/src/debugger/dap_command.rs b/crates/project/src/debugger/dap_command.rs index 772ff2dcfe..b36539034c 100644 --- a/crates/project/src/debugger/dap_command.rs +++ b/crates/project/src/debugger/dap_command.rs @@ -544,8 +544,8 @@ impl DapCommand for PauseCommand { #[derive(Debug, Hash, PartialEq, Eq)] pub(crate) struct DisconnectCommand { pub restart: Option, - pub terminate_debuggee: Option, - pub suspend_debuggee: Option, + pub terminate_debugger: Option, + pub suspend_debugger: Option, } impl LocalDapCommand for DisconnectCommand { @@ -555,8 +555,8 @@ impl LocalDapCommand for DisconnectCommand { fn to_dap(&self) -> ::Arguments { dap::DisconnectArguments { restart: self.restart, - terminate_debuggee: self.terminate_debuggee, - suspend_debuggee: self.suspend_debuggee, + terminate_debugger: self.terminate_debugger, + suspend_debugger: self.suspend_debugger, } } @@ -579,8 +579,8 @@ impl DapCommand for DisconnectCommand { fn from_proto(request: &Self::ProtoRequest) -> Self { Self { restart: request.restart, - terminate_debuggee: request.terminate_debuggee, - suspend_debuggee: request.suspend_debuggee, + terminate_debugger: request.terminate_debugger, + suspend_debugger: request.suspend_debugger, } } @@ -593,8 +593,8 @@ impl DapCommand for DisconnectCommand { project_id: upstream_project_id, client_id: debug_client_id.to_proto(), restart: self.restart, - terminate_debuggee: self.terminate_debuggee, - suspend_debuggee: self.suspend_debuggee, + terminate_debugger: self.terminate_debugger, + suspend_debugger: self.suspend_debugger, } } diff --git a/crates/project/src/debugger/memory.rs b/crates/project/src/debugger/memory.rs index 42ad64e688..cf1e3eed29 100644 --- a/crates/project/src/debugger/memory.rs +++ b/crates/project/src/debugger/memory.rs @@ -1,4 +1,4 @@ -//! This module defines the format in which memory of debuggee is represented. +//! This module defines the format in which memory of debugger is represented. //! //! Each byte in memory can either be mapped or unmapped. We try to mimic that twofold: //! - We assume that the memory is divided into pages of a fixed size. @@ -59,13 +59,13 @@ impl MappedPageContents { } } /// We hope for the whole page to be mapped in a single chunk, but we do leave the possibility open -/// of having interleaved read permissions in a single page; debuggee's execution environment might either +/// of having interleaved read permissions in a single page; debugger's execution environment might either /// have a different page size OR it might not have paged memory layout altogether /// (which might be relevant to embedded systems). /// /// As stated previously, the concept of a page in this module has to do more /// with optimizing fetching of the memory and not with the underlying bits and pieces -/// of the memory of a debuggee. +/// of the memory of a debugger. #[derive(Default, Debug)] pub(super) struct MappedPageContents( diff --git a/crates/project/src/debugger/session.rs b/crates/project/src/debugger/session.rs index 81cb3ade2e..ec5853732a 100644 --- a/crates/project/src/debugger/session.rs +++ b/crates/project/src/debugger/session.rs @@ -1009,7 +1009,7 @@ impl Session { let supports_terminate = self .capabilities - .support_terminate_debuggee + .support_terminate_debugger .unwrap_or(false); cx.background_spawn(async move { @@ -1024,8 +1024,8 @@ impl Session { client .request::(dap::DisconnectArguments { restart: Some(false), - terminate_debuggee: Some(true), - suspend_debuggee: Some(false), + terminate_debugger: Some(true), + suspend_debugger: Some(false), }) .await .ok(); @@ -2133,8 +2133,8 @@ impl Session { self.request( DisconnectCommand { restart: Some(false), - terminate_debuggee: Some(true), - suspend_debuggee: Some(false), + terminate_debugger: Some(true), + suspend_debugger: Some(false), }, Self::clear_active_debug_line_response, cx, @@ -2683,8 +2683,8 @@ impl Session { pub fn disconnect_client(&mut self, cx: &mut Context) { let command = DisconnectCommand { restart: Some(false), - terminate_debuggee: Some(false), - suspend_debuggee: Some(false), + terminate_debugger: Some(false), + suspend_debugger: Some(false), }; self.request(command, Self::empty_response, cx).detach() diff --git a/crates/proto/proto/debugger.proto b/crates/proto/proto/debugger.proto index c6f9c9f134..b6f754ea5a 100644 --- a/crates/proto/proto/debugger.proto +++ b/crates/proto/proto/debugger.proto @@ -195,8 +195,8 @@ message DapDisconnectRequest { uint64 project_id = 1; uint64 client_id = 2; optional bool restart = 3; - optional bool terminate_debuggee = 4; - optional bool suspend_debuggee = 5; + optional bool terminate_debugger = 4; + optional bool suspend_debugger = 5; } message DapTerminateThreadsRequest { diff --git a/crates/task/src/debug_format.rs b/crates/task/src/debug_format.rs index 38089670e2..849662bdcb 100644 --- a/crates/task/src/debug_format.rs +++ b/crates/task/src/debug_format.rs @@ -88,7 +88,7 @@ pub struct LaunchRequest { /// The current working directory of your project #[serde(default)] pub cwd: Option, - /// Arguments to pass to a debuggee + /// Arguments to pass to a debugger #[serde(default)] pub args: Vec, #[serde(default)] @@ -265,7 +265,7 @@ pub struct DebugScenario { pub adapter: SharedString, /// Name of the debug task pub label: SharedString, - /// A task to run prior to spawning the debuggee. + /// A task to run prior to spawning the debugger. #[serde(default, skip_serializing_if = "Option::is_none")] pub build: Option, /// The main arguments to be sent to the debug adapter diff --git a/docs/src/extensions/debugger-extensions.md b/docs/src/extensions/debugger-extensions.md index 4412bf8b9a..a3c9b005ba 100644 --- a/docs/src/extensions/debugger-extensions.md +++ b/docs/src/extensions/debugger-extensions.md @@ -32,7 +32,7 @@ This method should return the command to start up a debug adapter protocol serve If you need to download the DAP server from an external source—like GitHub Releases or npm—you can also do that in this function. Make sure to check for updates only periodically, as this function is called whenever a user spawns a new debug session with your debug adapter. -You must also implement `dap_request_kind`. This function is used to determine whether a given debug scenario will _launch_ a new debuggee or _attach_ to an existing one. +You must also implement `dap_request_kind`. This function is used to determine whether a given debug scenario will _launch_ a new debugger or _attach_ to an existing one. We also use it to determine that a given debug scenario requires running a _locator_. ```rust diff --git a/docs/src/languages/go.md b/docs/src/languages/go.md index 0a12616b1c..43f04fb90c 100644 --- a/docs/src/languages/go.md +++ b/docs/src/languages/go.md @@ -177,7 +177,7 @@ You might find yourself needing to connect to an existing instance of Delve that ] ``` -In such case Zed won't spawn a new instance of Delve, as it opts to use an existing one. The consequence of this is that _there will be no terminal_ in Zed; you have to interact with the Delve instance directly, as it handles stdin/stdout of the debuggee. +In such case Zed won't spawn a new instance of Delve, as it opts to use an existing one. The consequence of this is that _there will be no terminal_ in Zed; you have to interact with the Delve instance directly, as it handles stdin/stdout of the debugger. ## Go Mod