pub struct DebugAdapter { /* private fields */ }Expand description
DAP server that handles debug sessions
Implementations§
Source§impl DebugAdapter
impl DebugAdapter
Sourcepub fn handle_scopes(
&self,
seq: i64,
request_seq: i64,
arguments: Option<Value>,
) -> DapMessage
pub fn handle_scopes( &self, seq: i64, request_seq: i64, arguments: Option<Value>, ) -> DapMessage
Handle scopes request
Source§impl DebugAdapter
impl DebugAdapter
Sourcepub fn handle_variables(
&self,
seq: i64,
request_seq: i64,
arguments: Option<Value>,
) -> DapMessage
pub fn handle_variables( &self, seq: i64, request_seq: i64, arguments: Option<Value>, ) -> DapMessage
Handle variables request
Source§impl DebugAdapter
impl DebugAdapter
Sourcepub fn handle_request(
&mut self,
request_seq: i64,
command: &str,
arguments: Option<Value>,
) -> DapMessage
pub fn handle_request( &mut self, request_seq: i64, command: &str, arguments: Option<Value>, ) -> DapMessage
Dispatch a DAP request and return the response message.
Emits the initialized event automatically when an initialize request
succeeds. This mirrors the behavior expected by DAP-compliant clients.
Sourcepub fn handle_request_mock(
&mut self,
request_seq: i64,
command: &str,
arguments: Option<Value>,
) -> DapMessage
pub fn handle_request_mock( &mut self, request_seq: i64, command: &str, arguments: Option<Value>, ) -> DapMessage
Handle a DAP request (mock version for testing)
Source§impl DebugAdapter
impl DebugAdapter
Sourcepub fn set_event_sender(&mut self, sender: Sender<DapMessage>)
pub fn set_event_sender(&mut self, sender: Sender<DapMessage>)
Set the event sender (primarily for testing)
Sourcepub fn push_recent_output_line_for_test(&self, line: &str)
pub fn push_recent_output_line_for_test(&self, line: &str)
Push a line into the recent-output buffer for testing parser paths.
Only for use in tests; not part of the public API contract.
Sourcepub fn seed_running_session_for_test(&self)
pub fn seed_running_session_for_test(&self)
Seed a minimal DebugSession in Running state for testing stale-ref guards.
Creates a perl -e 1 child process, installs it as the active session, and
sets the state to DebugState::Running so that stale-ref-guard tests can
verify the “session is not stopped” path without a live debugging scenario.
Only for use in tests; not part of the public API contract.
Sourcepub fn seed_attached_pid_for_test(&self, pid: u32)
pub fn seed_attached_pid_for_test(&self, pid: u32)
Seed attached_pid with the given PID for testing.
Use a PID that is guaranteed not to exist (e.g. 999_999) to drive the
“session present, signal delivery failed” path in handle_pause.
Only for use in tests; not part of the public API contract.
Sourcepub fn seed_stopped_session_with_frames_for_test(&self, frames: Vec<StackFrame>)
pub fn seed_stopped_session_with_frames_for_test(&self, frames: Vec<StackFrame>)
Seed a stopped DebugSession with a given set of stack frames for testing frameId validation paths in handle_evaluate.
Only for use in tests; not part of the public API contract.