Skip to content

Fix debugger start ignoring save property#53353

Open
OmChillure wants to merge 1 commit intozed-industries:mainfrom
OmChillure:fix/debugger-start-ignore-save-property
Open

Fix debugger start ignoring save property#53353
OmChillure wants to merge 1 commit intozed-industries:mainfrom
OmChillure:fix/debugger-start-ignore-save-property

Conversation

@OmChillure
Copy link
Copy Markdown
Contributor

@OmChillure OmChillure commented Apr 8, 2026

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

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Closes #53284

Video after fix

Screencast.from.2026-04-08.08-04-18.webm

Release Notes:

  • Fixed debugger not saving files before running a build task when "save": "all" is set in the task definition

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Apr 8, 2026
@zed-community-bot zed-community-bot bot added the guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions label Apr 8, 2026
@zed-codeowner-coordinator zed-codeowner-coordinator bot requested review from a team, maxbrunsfeld and rtfeldman and removed request for a team April 8, 2026 02:44
@maxdeviant maxdeviant changed the title Fix debugger start ignore save property Fix debugger start ignoring save property Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

debugger::Start ignores "save" property of task

2 participants