From 376c19e06bedf54c8a897068f25ff7b9a8e75198 Mon Sep 17 00:00:00 2001 From: Filip Dutescu Date: Mon, 6 Mar 2023 11:19:53 +0200 Subject: feat(dap): implement Restart request (#5651) Add a restart debug session command, which would issue a [Restart Request][1], if the debugger supports it and a session is running. It uses the same arguments and requests used to start the initial session, when recreating it. It builds upon #5532, making use of the changes to the termination workflow of a session. [1]: https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Restart Closes: #5594 Signed-off-by: Filip Dutescu --- helix-dap/src/types.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'helix-dap/src/types.rs') diff --git a/helix-dap/src/types.rs b/helix-dap/src/types.rs index c598790b..bbaf53a6 100644 --- a/helix-dap/src/types.rs +++ b/helix-dap/src/types.rs @@ -378,7 +378,7 @@ pub mod requests { impl Request for Launch { type Arguments = Value; - type Result = Value; + type Result = (); const COMMAND: &'static str = "launch"; } @@ -387,7 +387,7 @@ pub mod requests { impl Request for Attach { type Arguments = Value; - type Result = Value; + type Result = (); const COMMAND: &'static str = "attach"; } @@ -402,6 +402,15 @@ pub mod requests { pub suspend_debuggee: Option, } + #[derive(Debug)] + pub enum Restart {} + + impl Request for Restart { + type Arguments = Value; + type Result = (); + const COMMAND: &'static str = "restart"; + } + #[derive(Debug)] pub enum Disconnect {} -- cgit v1.2.3-70-g09d2