aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/application.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-09-03 04:02:09 +0000
committerBlaž Hrastnik2021-09-03 04:26:30 +0000
commitb997d2cdeb3abd62fdd3c809a69478bbdef8642e (patch)
treed99dec73aa5cfe4fcb95a13d798c5f43d28aa488 /helix-term/src/application.rs
parent289303a30d8518890ae708b7fdd4996830df8642 (diff)
dap: Allow setting breakpoints before starting the adapter
Diffstat (limited to 'helix-term/src/application.rs')
-rw-r--r--helix-term/src/application.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index d74f9198..5fc35977 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -320,10 +320,18 @@ impl Application {
None => "Debug:".to_owned(),
};
+ log::info!("{}", output);
self.editor.set_status(format!("{} {}", prefix, output));
}
Event::Initialized => {
// send existing breakpoints
+ for (path, breakpoints) in &self.editor.breakpoints {
+ // TODO: call futures in parallel, await all
+ debugger
+ .set_breakpoints(path.clone(), breakpoints.clone())
+ .await
+ .unwrap();
+ }
// TODO: fetch breakpoints (in case we're attaching)
if let Ok(_) = debugger.configuration_done().await {