diff --git a/crates/project/src/dap_store.rs b/crates/project/src/dap_store.rs index 1bbe22c00ce4b0..f107ee1ad01099 100644 --- a/crates/project/src/dap_store.rs +++ b/crates/project/src/dap_store.rs @@ -780,7 +780,17 @@ impl DapStore { cx.spawn(|this, mut cx| async move { let session = cx.new_model(|_| DebugSession::new_local(session_id, config))?; - let client = start_client_task.await?; + let client = match start_client_task.await { + Ok(client) => client, + Err(error) => { + this.update(&mut cx, |_, cx| { + cx.emit(DapStoreEvent::Notification(error.to_string())); + }) + .log_err(); + + return Err(error); + } + }; this.update(&mut cx, |store, cx| { session.update(cx, |session, cx| { diff --git a/crates/tasks_ui/src/modal.rs b/crates/tasks_ui/src/modal.rs index 42029ced7cc109..12a9b125a545bd 100644 --- a/crates/tasks_ui/src/modal.rs +++ b/crates/tasks_ui/src/modal.rs @@ -17,9 +17,7 @@ use ui::{ WindowContext, }; use util::ResultExt; -use workspace::{ - notifications::NotifyTaskExt, tasks::schedule_resolved_task, ModalView, Workspace, -}; +use workspace::{tasks::schedule_resolved_task, ModalView, Workspace}; pub use zed_actions::{Rerun, Spawn}; /// A modal used to spawn new tasks. @@ -323,7 +321,7 @@ impl PickerDelegate for TasksModalDelegate { workspace.project().update(cx, |project, cx| { project .start_debug_session(debug_config, cx) - .detach_and_notify_err(cx); + .detach_and_log_err(cx); }) } }; @@ -487,7 +485,7 @@ impl PickerDelegate for TasksModalDelegate { workspace.project().update(cx, |project, cx| { project .start_debug_session(debug_config, cx) - .detach_and_notify_err(cx); + .detach_and_log_err(cx); }) } };