Skip to content

Commit 9dcdc62

Browse files
rkeithhilldaviwil
authored andcommitted
Return undefined when attach is not supported
microsoft/vscode#33794 (comment)
1 parent f709269 commit 9dcdc62

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/features/DebugSession.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@ export class DebugSessionFeature implements IFeature {
5151
if (config.request === "attach") {
5252
let versionDetails = this.sessionManager.getPowerShellVersionDetais();
5353
if (versionDetails.edition.toLowerCase() === "core") {
54-
vscode.window.showErrorMessage("PowerShell Core does not support attaching to a PowerShell host process.");
55-
return;
54+
let msg = "PowerShell Core does not support attaching to a PowerShell host process.";
55+
return vscode.window.showErrorMessage(msg).then(_ => {
56+
return undefined;
57+
});
5658
}
5759
}
5860

0 commit comments

Comments
 (0)