summaryrefslogtreecommitdiff
path: root/helix-dap/src
diff options
context:
space:
mode:
Diffstat (limited to 'helix-dap/src')
-rw-r--r--helix-dap/src/client.rs13
-rw-r--r--helix-dap/src/types.rs23
2 files changed, 36 insertions, 0 deletions
diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs
index 2ae82422..8dd41868 100644
--- a/helix-dap/src/client.rs
+++ b/helix-dap/src/client.rs
@@ -399,4 +399,17 @@ impl Client {
self.request::<requests::Evaluate>(args).await
}
+
+ pub async fn set_exception_breakpoints(
+ &mut self,
+ filters: Vec<String>,
+ ) -> Result<Option<Vec<Breakpoint>>> {
+ let args = requests::SetExceptionBreakpointsArguments { filters };
+
+ let response = self
+ .request::<requests::SetExceptionBreakpoints>(args)
+ .await;
+
+ Ok(response.ok().map(|r| r.breakpoints).unwrap_or_default())
+ }
}
diff --git a/helix-dap/src/types.rs b/helix-dap/src/types.rs
index 3af29922..5430771f 100644
--- a/helix-dap/src/types.rs
+++ b/helix-dap/src/types.rs
@@ -515,6 +515,29 @@ pub mod requests {
type Result = EvaluateResponse;
const COMMAND: &'static str = "evaluate";
}
+
+ #[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
+ #[serde(rename_all = "camelCase")]
+ pub struct SetExceptionBreakpointsArguments {
+ pub filters: Vec<String>,
+ // pub filterOptions: Option<Vec<ExceptionFilterOptions>>, // needs capability
+ // pub exceptionOptions: Option<Vec<ExceptionOptions>>, // needs capability
+ }
+
+ #[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
+ #[serde(rename_all = "camelCase")]
+ pub struct SetExceptionBreakpointsResponse {
+ pub breakpoints: Option<Vec<Breakpoint>>,
+ }
+
+ #[derive(Debug)]
+ pub enum SetExceptionBreakpoints {}
+
+ impl Request for SetExceptionBreakpoints {
+ type Arguments = SetExceptionBreakpointsArguments;
+ type Result = SetExceptionBreakpointsResponse;
+ const COMMAND: &'static str = "setExceptionBreakpoints";
+ }
}
// Events