From d716ce4e27c7f2a43b4ff6e8861cbf3764a35813 Mon Sep 17 00:00:00 2001 From: Tyler Leonhardt Date: Mon, 28 Jan 2019 14:31:45 -0800 Subject: [PATCH 1/3] turn off non-windows gate for attach to process --- src/features/DebugSession.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/features/DebugSession.ts b/src/features/DebugSession.ts index 6917fffa05..9eac73beed 100644 --- a/src/features/DebugSession.ts +++ b/src/features/DebugSession.ts @@ -68,7 +68,8 @@ export class DebugSessionFeature implements IFeature, DebugConfigurationProvider const platformDetails = getPlatformDetails(); const versionDetails = this.sessionManager.getPowerShellVersionDetails(); - if (platformDetails.operatingSystem !== OperatingSystem.Windows) { + // Cross-platform attach to process was added in 6.2.0-preview.4 + if (versionDetails.version < "6.2.0" && platformDetails.operatingSystem !== OperatingSystem.Windows) { const msg = "Attaching to a PowerShell Host Process is supported only on Windows."; return vscode.window.showErrorMessage(msg).then((_) => { return undefined; From 3b504d0e9e8725b77008ef7b7cab77ffa2154d1f Mon Sep 17 00:00:00 2001 From: Tyler Leonhardt Date: Tue, 29 Jan 2019 12:25:24 -0800 Subject: [PATCH 2/3] address feedback --- src/features/DebugSession.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/features/DebugSession.ts b/src/features/DebugSession.ts index 9eac73beed..5590dbac39 100644 --- a/src/features/DebugSession.ts +++ b/src/features/DebugSession.ts @@ -70,7 +70,8 @@ export class DebugSessionFeature implements IFeature, DebugConfigurationProvider // Cross-platform attach to process was added in 6.2.0-preview.4 if (versionDetails.version < "6.2.0" && platformDetails.operatingSystem !== OperatingSystem.Windows) { - const msg = "Attaching to a PowerShell Host Process is supported only on Windows."; + const msg = `Attaching to a PowerShell Host Process on '${ + OperatingSystem[platformDetails.operatingSystem] }' requires PowerShell 6.2 or higher.`; return vscode.window.showErrorMessage(msg).then((_) => { return undefined; }); From b9a30727c4ea9c34679e73b627fe0434e163956c Mon Sep 17 00:00:00 2001 From: Tyler Leonhardt Date: Tue, 29 Jan 2019 12:26:31 -0800 Subject: [PATCH 3/3] no single quotes --- src/features/DebugSession.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/features/DebugSession.ts b/src/features/DebugSession.ts index 5590dbac39..a8c55322f8 100644 --- a/src/features/DebugSession.ts +++ b/src/features/DebugSession.ts @@ -70,8 +70,8 @@ export class DebugSessionFeature implements IFeature, DebugConfigurationProvider // Cross-platform attach to process was added in 6.2.0-preview.4 if (versionDetails.version < "6.2.0" && platformDetails.operatingSystem !== OperatingSystem.Windows) { - const msg = `Attaching to a PowerShell Host Process on '${ - OperatingSystem[platformDetails.operatingSystem] }' requires PowerShell 6.2 or higher.`; + const msg = `Attaching to a PowerShell Host Process on ${ + OperatingSystem[platformDetails.operatingSystem] } requires PowerShell 6.2 or higher.`; return vscode.window.showErrorMessage(msg).then((_) => { return undefined; });