debugger: Fix restart only working once per session#51247
debugger: Fix restart only working once per session#51247Anthony-Eid merged 4 commits intozed-industries:mainfrom
Conversation
`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. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
We require contributors to sign our Contributor License Agreement, and we don't have @nelsoncampos-cloudwalk on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
before: after.movafter: before.mov |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Anthony-Eid
left a comment
There was a problem hiding this comment.
Thanks for catching this bug and making a fix! I added a regression test to prevent this from happening in the future.
I'm going to enable auto merge 😀
|
Thanks for the quick review and merge! Happy to help 😀 Will make sure to include tests in future contributions. |
…1247) `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: zed-extensions/dart#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>
Session::restart_taskis set toSomewhen a restart is initiated but never cleared back toNone. The guard at the top ofrestart()checksself.restart_task.is_some()and returns early, so only the first restart attempt succeeds.This primarily affects debug adapters that advertise
supportsRestartRequestdynamically via aCapabilitiesEventafter launch, such as the Flutter debug adapter.Related: zed-extensions/dart#45
Before you mark this PR as ready for review, make sure that you have:
Release Notes: