Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
debugger: Do not set exception breakpoints in initialization sequence in certain conditions (#33723)
Piotr Osiewiczeb74df632bf8
diff --git a/crates/project/src/debugger/session.rs b/crates/project/src/debugger/session.rsindex 837bc4b81c5..b76200aee6e 100644--- a/crates/project/src/debugger/session.rs+++ b/crates/project/src/debugger/session.rs@@ -420,6 +420,15 @@ impl RunningMode {.collect::<Vec<_>>()}).unwrap_or_default();+ // From spec (on initialization sequence):+ // client sends a setExceptionBreakpoints request if one or more exceptionBreakpointFilters have been defined (or if supportsConfigurationDoneRequest is not true)+ //+ // Thus we should send setExceptionBreakpoints even if `exceptionFilters` variable is empty (as long as there were some options in the first place).+ let should_send_exception_breakpoints = capabilities+ .exception_breakpoint_filters+ .as_ref()+ .map_or(false, |filters| !filters.is_empty())+ || !configuration_done_supported;let supports_exception_filters = capabilities.supports_exception_filter_options.unwrap_or_default();@@ -461,9 +470,12 @@ impl RunningMode {}})?;- this.send_exception_breakpoints(exception_filters, supports_exception_filters)- .await- .ok();+ if should_send_exception_breakpoints {+ this.send_exception_breakpoints(exception_filters, supports_exception_filters)+ .await+ .ok();+ }+let ret = if configuration_done_supported {this.request(ConfigurationDone {})} else {