Skip to content

fix: cancel debug launch when ESC is pressed on input variable dialog#293837

Merged
connor4312 merged 3 commits intomicrosoft:mainfrom
na3shkw:fix/pickString-cancel-regression
Feb 17, 2026
Merged

fix: cancel debug launch when ESC is pressed on input variable dialog#293837
connor4312 merged 3 commits intomicrosoft:mainfrom
na3shkw:fix/pickString-cancel-regression

Conversation

@na3shkw
Copy link
Contributor

@na3shkw na3shkw commented Feb 9, 2026

Fixes #248716

When a user cancels a pickString (or other input variable) dialog by pressing ESC during a debug launch, the launch incorrectly continues with the unresolved ${input:...} string instead of aborting.

Root Cause

resolveWithInteractionReplace was ignoring the return value of resolveWithInteraction, which returns undefined when the user cancels the input. As a result, even after cancellation, parsed.toObject() was called and returned the config with the raw ${input:...} placeholder string, causing the launch to proceed.

Changes

  • baseConfigurationResolverService.ts: Check the return value of resolveWithInteraction in resolveWithInteractionReplace. If it returns undefined (user canceled), propagate undefined instead of calling parsed.toObject().
  • debugger.ts: Update the return type of substituteVariables to Promise<IConfig | undefined> to reflect that variable resolution can be canceled.
  • configurationResolverService.test.ts: Add a test that verifies resolveWithInteractionReplace returns undefined when the user cancels input.

After this fix, pressing ESC on the pickString dialog correctly aborts the launch:

Pressing ESC on pickString dialog aborts the debug launch

@na3shkw
Copy link
Contributor Author

na3shkw commented Feb 9, 2026

@microsoft-github-policy-service agree

connor4312
connor4312 previously approved these changes Feb 10, 2026
@connor4312 connor4312 enabled auto-merge (squash) February 10, 2026 02:19
@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Feb 10, 2026
DonJayamanne
DonJayamanne previously approved these changes Feb 10, 2026
auto-merge was automatically disabled February 10, 2026 13:03

Head branch was pushed to by a user without write access

@na3shkw na3shkw dismissed stale reviews from DonJayamanne and connor4312 via 86acfff February 10, 2026 13:03
@connor4312 connor4312 enabled auto-merge (squash) February 17, 2026 15:51
@connor4312 connor4312 merged commit 0a1e0c9 into microsoft:main Feb 17, 2026
21 of 32 checks passed
@na3shkw na3shkw deleted the fix/pickString-cancel-regression branch February 18, 2026 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

regression: Task with pickstring executes eventhough escape button is pressed

5 participants