fix: preserve 'Wait for Breakpoint' selection when reopening breakpoint widget#306564
Merged
connor4312 merged 1 commit intoApr 1, 2026
Merged
Conversation
When reopening the breakpoint widget for a breakpoint that already has a "Wait for Breakpoint" trigger configured, the triggeredByBreakpointInput field was never initialized from the existing breakpoint's triggeredBy value. The select box visually showed the correct trigger breakpoint, but clicking OK without changing the selection would clear the triggeredBy field because triggeredByBreakpointInput was still undefined. Closes microsoft#305887
Yoyokrazy
approved these changes
Mar 31, 2026
auto-merge was automatically disabled
March 31, 2026 17:47
Pull request was closed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What kind of change does this PR introduce?
Bug fix
What is the current behavior?
When editing a breakpoint that already has a "Wait for Breakpoint" trigger configured, reopening the breakpoint widget and clicking OK (without changing the selection) clears the trigger. The select box visually displays the correct trigger breakpoint, but the underlying
triggeredByBreakpointInputfield is never initialized from the existing breakpoint'striggeredByvalue. Since it remainsundefined, saving writesundefinedback, erasing the configuration.Closes #305887
What is the new behavior?
When
createTriggerBreakpointInputbuilds the select box, it now initializestriggeredByBreakpointInputfrom the existing breakpoint'striggeredByvalue (when one exists). This ensures that clicking OK without changing the selection preserves the existing trigger breakpoint configuration.Additional context
The fix mirrors how the
onDidSelecthandler already setstriggeredByBreakpointInputfrom the available breakpoints array — it simply does the same initialization at widget creation time using the index that was already being computed for the select box.