mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-26 07:24:46 +00:00
## Summary When `debugger::Start` runs a build task (via the `"build"` field in `debug.json`), it was bypassing the task's `"save"` property and calling `project.create_terminal_task()` directly. This meant unsaved files were never saved before the build ran, even when `"save": "all"` was set unlike `task: spawn` which correctly saved first. **Changes:** - Extracted `Workspace::save_for_task(workspace, strategy, cx)` as a shared async helper in `workspace/src/tasks.rs` - Refactored `schedule_resolved_task` to call this helper (no behavior change, removes inline duplication) - Called the same helper in `RunningState::resolve_scenario` before `create_terminal_task`, so the debugger build path now respects the task's `save` strategy - Added `test_save_for_task_all`, `test_save_for_task_current`, and `test_save_for_task_none` tests covering the extracted helper directly ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [ ] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Closes #53284 ## Video after fix [Screencast from 2026-04-08 08-04-18.webm](https://github.com/user-attachments/assets/b0c20164-3670-440a-b43a-8457fb57bfbd) ## Release Notes: - Fixed debugger not saving files before running a build task when `"save": "all"` is set in the task definition |
||
|---|---|---|
| .. | ||
| session | ||
| tests | ||
| attach_modal.rs | ||
| debugger_panel.rs | ||
| debugger_ui.rs | ||
| dropdown_menus.rs | ||
| new_process_modal.rs | ||
| persistence.rs | ||
| session.rs | ||
| tests.rs | ||