debugger: Open correct pane for breakpoints#49390
Merged
Anthony-Eid merged 5 commits intomainfrom Feb 24, 2026
Merged
Conversation
github-actions bot
added a commit
that referenced
this pull request
Feb 24, 2026
debugger: Open correct pane for breakpoints Auto-generated documentation suggestions for review at next preview release.
Anthony-Eid
added a commit
to bobbymannino/zed
that referenced
this pull request
Feb 25, 2026
Closes zed-industries#40602 ### Summary This PR ensures that active debug lines only open in a single pane and new active debug lines are added to the most recent pane that contained an active debug line. This fixes a bug where Zed could go to the active debug line file and location in every pane a user had open, even if that pane was focused on a different file. I fixed this by storing the `entity_id` of the pane containing the most recently active debug line on `BreakpointStore`, this is consistent with where the selected stack frame is stored. I used an `entity_id` instead of a strong type to avoid circular dependencies. Whenever an active debug line is being set in the editor or by the debugger it now checks if there's a specific pane it should be set in, and after setting the line it updates `BreakpointStore` state. I also added a new method on the `workspace::Item` trait called `fn pane_changed(&mut self, new_pane_id: EntityId, cx: &mut Context<Self>)` To enable `Editor` to update `BreakpointStore`'s active debug line pane id whenever an `Editor` is moved to a new pane. ### PR review TODO list 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 - [x] Aligned any UI changes with the [UI checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) Release Notes: - debugger: Fix bug where active debug lines could be set in the wrong pane
morgankrey
added a commit
that referenced
this pull request
Feb 25, 2026
Auto-applied queued documentation suggestions from: - PR #48908 - PR #48909 - PR #48910 - PR #48912 - PR #48930 - PR #44794 - PR #48763 - PR #45073 - PR #48495 - PR #49374 - PR #49139 - PR #48780 - PR #48619 - PR #48978 - PR #48962 - PR #48988 - PR #47860 - PR #49015 - PR #47095 - PR #47475 - PR #48542 - PR #46766 - PR #47754 - PR #48807 - PR #44506 - PR #49051 - PR #49069 - PR #48842 - PR #48851 - PR #48736 - PR #47673 - PR #49094 - PR #49098 - PR #49622 - PR #49554 - PR #49710 - PR #49716 - PR #49732 - PR #49788 - PR #49876 - PR #49902 - PR #49910 - PR #49390 - PR #50027 Generated with script/docs-suggest-publish for human review in draft PR.
morgankrey
added a commit
that referenced
this pull request
Feb 25, 2026
Auto-applied queued documentation suggestions from: - PR #48908 - PR #48909 - PR #48910 - PR #48912 - PR #48930 - PR #44794 - PR #48763 - PR #45073 - PR #48495 - PR #49374 - PR #49139 - PR #48780 - PR #48619 - PR #48978 - PR #48962 - PR #48988 - PR #47860 - PR #49015 - PR #47095 - PR #47475 - PR #48542 - PR #46766 - PR #47754 - PR #48807 - PR #44506 - PR #49051 - PR #49069 - PR #48842 - PR #48851 - PR #48736 - PR #47673 - PR #49094 - PR #49098 - PR #49622 - PR #49554 - PR #49710 - PR #49716 - PR #49732 - PR #49788 - PR #49876 - PR #49902 - PR #49910 - PR #49390 - PR #50027 Generated with script/docs-suggest-publish for human review in draft PR.
tahayvr
pushed a commit
to tahayvr/zed
that referenced
this pull request
Mar 4, 2026
Closes zed-industries#40602 ### Summary This PR ensures that active debug lines only open in a single pane and new active debug lines are added to the most recent pane that contained an active debug line. This fixes a bug where Zed could go to the active debug line file and location in every pane a user had open, even if that pane was focused on a different file. I fixed this by storing the `entity_id` of the pane containing the most recently active debug line on `BreakpointStore`, this is consistent with where the selected stack frame is stored. I used an `entity_id` instead of a strong type to avoid circular dependencies. Whenever an active debug line is being set in the editor or by the debugger it now checks if there's a specific pane it should be set in, and after setting the line it updates `BreakpointStore` state. I also added a new method on the `workspace::Item` trait called `fn pane_changed(&mut self, new_pane_id: EntityId, cx: &mut Context<Self>)` To enable `Editor` to update `BreakpointStore`'s active debug line pane id whenever an `Editor` is moved to a new pane. ### PR review TODO list 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 - [x] Aligned any UI changes with the [UI checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) Release Notes: - debugger: Fix bug where active debug lines could be set in the wrong pane
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #40602
Summary
This PR ensures that active debug lines only open in a single pane and new active debug lines are added to the most recent pane that contained an active debug line. This fixes a bug where Zed could go to the active debug line file and location in every pane a user had open, even if that pane was focused on a different file.
I fixed this by storing the
entity_idof the pane containing the most recently active debug line onBreakpointStore, this is consistent with where the selected stack frame is stored. I used anentity_idinstead of a strong type to avoid circular dependencies. Whenever an active debug line is being set in the editor or by the debugger it now checks if there's a specific pane it should be set in, and after setting the line it updatesBreakpointStorestate.I also added a new method on the
workspace::Itemtrait calledfn pane_changed(&mut self, new_pane_id: EntityId, cx: &mut Context<Self>)To enableEditorto updateBreakpointStore's active debug line pane id whenever anEditoris moved to a new pane.PR review TODO list
Before you mark this PR as ready for review, make sure that you have:
Release Notes: