From b3be6b269aaf8b81d74ca4f0001254d8a17a6c76 Mon Sep 17 00:00:00 2001 From: Dmitry Sharshakov Date: Sat, 14 Aug 2021 09:25:44 +0300 Subject: dap-basic: parse stop event --- helix-dap/src/client.rs | 12 ++++++++++++ helix-dap/src/lib.rs | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'helix-dap/src') diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs index ef7bb153..a12238ae 100644 --- a/helix-dap/src/client.rs +++ b/helix-dap/src/client.rs @@ -267,6 +267,18 @@ pub struct OutputEventBody { pub data: Option, } +#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct StoppedEventBody { + pub reason: String, + pub description: Option, + pub thread_id: Option, + pub preserve_focus_hint: Option, + pub text: Option, + pub all_threads_stopped: Option, + pub hit_breakpoint_ids: Option>, +} + #[derive(Debug)] pub struct Client { id: usize, diff --git a/helix-dap/src/lib.rs b/helix-dap/src/lib.rs index 408f4d3d..87eea8e4 100644 --- a/helix-dap/src/lib.rs +++ b/helix-dap/src/lib.rs @@ -1,7 +1,7 @@ mod client; mod transport; -pub use client::{Breakpoint, Client, OutputEventBody, SourceBreakpoint}; +pub use client::{Breakpoint, Client, OutputEventBody, SourceBreakpoint, StoppedEventBody}; pub use transport::{Event, Payload, Request, Response, Transport}; use thiserror::Error; -- cgit v1.2.3-70-g09d2