diff options
author | Dmitry Sharshakov | 2021-08-24 07:48:47 +0000 |
---|---|---|
committer | Dmitry Sharshakov | 2021-08-24 07:48:47 +0000 |
commit | fdad7d67aa158c963a4b5397e9d7de960706cd2a (patch) | |
tree | 49a27255ffb5e92301c1744d4270b4f97aa84c12 /helix-dap/src | |
parent | c4085b4e8885a32a7b05529fe873d38d185ce886 (diff) |
Check capabilities for breakpoint config
Diffstat (limited to 'helix-dap/src')
-rw-r--r-- | helix-dap/src/client.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs index 9a2e3920..94a76a54 100644 --- a/helix-dap/src/client.rs +++ b/helix-dap/src/client.rs @@ -26,7 +26,7 @@ pub struct Client { _process: Option<Child>, server_tx: UnboundedSender<Request>, request_counter: AtomicU64, - capabilities: Option<DebuggerCapabilities>, + pub caps: Option<DebuggerCapabilities>, // pub breakpoints: HashMap<PathBuf, Vec<SourceBreakpoint>>, // TODO: multiple threads support @@ -77,7 +77,7 @@ impl Client { _process: process, server_tx, request_counter: AtomicU64::new(0), - capabilities: None, + caps: None, // breakpoints: HashMap::new(), stack_pointer: None, @@ -225,9 +225,7 @@ impl Client { } pub fn capabilities(&self) -> &DebuggerCapabilities { - self.capabilities - .as_ref() - .expect("debugger not yet initialized!") + self.caps.as_ref().expect("debugger not yet initialized!") } pub async fn initialize(&mut self, adapter_id: String) -> Result<()> { @@ -248,7 +246,7 @@ impl Client { }; let response = self.request::<requests::Initialize>(args).await?; - self.capabilities = Some(response); + self.caps = Some(response); Ok(()) } |