From 9003558db9d2b1485345336f4a902d1b834e4058 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Mon, 9 Aug 2021 13:05:08 -0700 Subject: [PATCH] Don't create launch.json for no select process This PR fixes resolveDebugConfigurationWithSubstitutedVariables to return null when user does not select a process in the process selection dialog. --- src/coreclr-debug/debugConfigurationProvider.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/coreclr-debug/debugConfigurationProvider.ts b/src/coreclr-debug/debugConfigurationProvider.ts index c7ac346a0..ff88bbe90 100644 --- a/src/coreclr-debug/debugConfigurationProvider.ts +++ b/src/coreclr-debug/debugConfigurationProvider.ts @@ -55,7 +55,8 @@ export class DotnetDebugConfigurationProvider implements vscode.DebugConfigurati } else { - throw new Error("No process was selected."); + vscode.window.showErrorMessage("No process was selected.", { modal: true }); + return undefined; } }