From 29b0b0611a450ee05eb28539b6061be8cfaa75ef Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Thu, 1 Jul 2021 12:05:23 -0700 Subject: [PATCH] Fix debug configuration selection cancellation. (#7763) --- Extension/CHANGELOG.md | 1 + Extension/src/Debugger/configurationProvider.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index 46f04925cf..c973f6f639 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -19,6 +19,7 @@ ### Bug Fixes * Fix code folding causing `} else if` lines to be hidden. [#5521](https://github.com/microsoft/vscode-cpptools/issues/5521) +* Fix empty `launch.json` being created when debug configuration selection is canceled. [#7517](https://github.com/microsoft/vscode-cpptools/issues/7517) * Fix Find All References on a global variable giving incorrect references to local variables. [#7702](https://github.com/microsoft/vscode-cpptools/issues/7702) * Fix `vcFormat` not working near the end of the file with UTF-8 characters > 1 byte. [#7704](https://github.com/microsoft/vscode-cpptools/issues/7704) * Fix configuration squiggle on a recursively resolved `forcedInclude`. [PR #7722](https://github.com/microsoft/vscode-cpptools/pull/7722) diff --git a/Extension/src/Debugger/configurationProvider.ts b/Extension/src/Debugger/configurationProvider.ts index 90b70ff6df..e187fea578 100644 --- a/Extension/src/Debugger/configurationProvider.ts +++ b/Extension/src/Debugger/configurationProvider.ts @@ -71,7 +71,7 @@ export class QuickPickConfigurationProvider implements vscode.DebugConfiguration const selection: MenuItem | undefined = await vscode.window.showQuickPick(items, {placeHolder: localize("select.configuration", "Select a configuration")}); if (!selection) { - return []; // User canceled it. + throw Error(localize("debug.configuration.selection.canceled", "Debug configuration selection canceled")); // User canceled it. } if (selection.label.startsWith("cl.exe")) { if (!process.env.DevEnvDir) {