Skip to content

fix: preserve 'Wait for Breakpoint' selection when reopening breakpoint widget#306564

Merged
connor4312 merged 1 commit into
microsoft:mainfrom
yogeshwaran-c:fix/wait-for-breakpoint-not-saved
Apr 1, 2026
Merged

fix: preserve 'Wait for Breakpoint' selection when reopening breakpoint widget#306564
connor4312 merged 1 commit into
microsoft:mainfrom
yogeshwaran-c:fix/wait-for-breakpoint-not-saved

Conversation

@yogeshwaran-c
Copy link
Copy Markdown
Contributor

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 triggeredByBreakpointInput field is never initialized from the existing breakpoint's triggeredBy value. Since it remains undefined, saving writes undefined back, erasing the configuration.

Closes #305887

What is the new behavior?

When createTriggerBreakpointInput builds the select box, it now initializes triggeredByBreakpointInput from the existing breakpoint's triggeredBy value (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 onDidSelect handler already sets triggeredByBreakpointInput from 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.

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
Copy link
Copy Markdown
Member

@connor4312 connor4312 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@connor4312 connor4312 enabled auto-merge (squash) March 31, 2026 15:12
@connor4312 connor4312 closed this Mar 31, 2026
auto-merge was automatically disabled March 31, 2026 17:47

Pull request was closed

@connor4312 connor4312 reopened this Mar 31, 2026
@connor4312 connor4312 merged commit b1b8217 into microsoft:main Apr 1, 2026
33 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.115.0 milestone Apr 1, 2026
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators May 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The information in "wait for breakpoint" cannot be saved

3 participants