zed/crates/debugger_ui/src
Nelson Campos 314b7e55fb
debugger: Fix restart only working once per session (#51247)
`Session::restart_task` is set to `Some` when a restart is initiated but
never cleared back to `None`. The guard at the top of `restart()` checks
`self.restart_task.is_some()` and returns early, so only the first
restart attempt succeeds.

This primarily affects debug adapters that advertise
`supportsRestartRequest` dynamically via a `CapabilitiesEvent` after
launch, such as the Flutter debug adapter.

Related: https://github.com/zed-extensions/dart/issues/45

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
(N/A — no UI changes)

Release Notes:

- debugger: Fixed debug session restart only working once when the
adapter supports DAP restart requests.

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Anthony Eid <anthony@zed.dev>
2026-03-12 13:05:52 +00:00
..
session terminal: Fix drag-and-drop in vertical terminal panels (#49825) 2026-03-06 11:37:14 +02:00
tests debugger: Fix restart only working once per session (#51247) 2026-03-12 13:05:52 +00:00
attach_modal.rs gpui: Implement From<String> for ElementId (#44447) 2025-12-09 09:08:59 +01:00
debugger_panel.rs Redact environment variables from debugger errors (#50008) 2026-02-25 16:18:42 +01:00
debugger_ui.rs Start removing callers of legacy excerpt APIs (#50144) 2026-02-26 10:37:43 -05:00
dropdown_menus.rs Fix triggers for debugger thread and session lists not rendering (#40227) 2025-10-15 04:36:04 +00:00
new_process_modal.rs debugger: Wrap TaskContext in Arc to reduce cloning overhead (#47087) 2026-02-05 10:37:39 +00:00
persistence.rs terminal: Fix drag-and-drop in vertical terminal panels (#49825) 2026-03-06 11:37:14 +02:00
session.rs Start removing callers of legacy excerpt APIs (#50144) 2026-02-26 10:37:43 -05:00
tests.rs debugger: Fix restart only working once per session (#51247) 2026-03-12 13:05:52 +00:00