Skip to content

Commit 64ddced

Browse files
authored
Move projectPath check into UnavaliableLaunchServiceError (#7199)
This PR moves the projectPath check into the scenario where UnavaliableLaunchServiceError as this is the fallback if C# Dev Kit is not installed. This requires the `dotnet` configuration to have a proejctPath.
1 parent 4eb0250 commit 64ddced

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/shared/dotnetConfigurationProvider.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,13 @@ export class DotnetConfigurationResolver implements vscode.DebugConfigurationPro
110110
throw new UnavaliableLaunchServiceError();
111111
}
112112
} catch (e) {
113-
if (!projectPath) {
114-
throw new LaunchServiceError(
115-
vscode.l10n.t("'{0}' was not provided in the debug configuration.", 'projectPath')
116-
);
117-
}
118113
if (e instanceof UnavaliableLaunchServiceError) {
114+
if (!projectPath) {
115+
throw new LaunchServiceError(
116+
vscode.l10n.t("'{0}' was not provided in the debug configuration.", 'projectPath')
117+
);
118+
}
119+
119120
return await this.resolveDebugConfigurationWithWorkspaceDebugInformationProvider(
120121
folder,
121122
projectPath

0 commit comments

Comments
 (0)