@@ -101,7 +101,6 @@ use uuid::Uuid;
101101use crate :: console_annotate:: annotate_input;
102102use crate :: console_debug:: FrameInfoId ;
103103use crate :: dap:: dap:: Breakpoint ;
104- use crate :: dap:: dap:: BreakpointState ;
105104use crate :: dap:: dap:: DapBackendEvent ;
106105use crate :: dap:: Dap ;
107106use crate :: errors:: stack_overflow_occurred;
@@ -1445,20 +1444,11 @@ impl RMain {
14451444 } ,
14461445 }
14471446
1448- // Notify frontend about any breakpoints marked invalid during annotation
1447+ // Notify frontend about any breakpoints marked invalid during annotation.
1448+ // Remove disabled breakpoints.
14491449 if let Some ( uri) = & uri {
1450- if let Some ( ( _, bps) ) = dap_guard. breakpoints . get ( uri) {
1451- dap_guard. notify_invalid_breakpoints ( bps) ;
1452- }
1453- }
1454-
1455- // Remove disabled breakpoints. Their verification state is now stale since
1456- // they weren't injected during this annotation. If the user re-enables
1457- // them, they'll be treated as new unverified breakpoints.
1458- if let Some ( uri) = & uri {
1459- if let Some ( ( _, bps) ) = dap_guard. breakpoints . get_mut ( uri) {
1460- bps. retain ( |bp| !matches ! ( bp. state, BreakpointState :: Disabled ) ) ;
1461- }
1450+ dap_guard. notify_invalid_breakpoints ( uri) ;
1451+ dap_guard. remove_disabled_breakpoints ( uri) ;
14621452 }
14631453
14641454 drop ( dap_guard) ;
0 commit comments