Skip to content

Commit ef8c85a

Browse files
turn off non-windows gate for attach to process (#1736)
* turn off non-windows gate for attach to process * address feedback * no single quotes
1 parent f8a693e commit ef8c85a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/features/DebugSession.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ export class DebugSessionFeature implements IFeature, DebugConfigurationProvider
6868
const platformDetails = getPlatformDetails();
6969
const versionDetails = this.sessionManager.getPowerShellVersionDetails();
7070

71-
if (platformDetails.operatingSystem !== OperatingSystem.Windows) {
72-
const msg = "Attaching to a PowerShell Host Process is supported only on Windows.";
71+
// Cross-platform attach to process was added in 6.2.0-preview.4
72+
if (versionDetails.version < "6.2.0" && platformDetails.operatingSystem !== OperatingSystem.Windows) {
73+
const msg = `Attaching to a PowerShell Host Process on ${
74+
OperatingSystem[platformDetails.operatingSystem] } requires PowerShell 6.2 or higher.`;
7375
return vscode.window.showErrorMessage(msg).then((_) => {
7476
return undefined;
7577
});

0 commit comments

Comments
 (0)