diff --git a/src/features/DebugSession.ts b/src/features/DebugSession.ts index 6917fffa05..a8c55322f8 100644 --- a/src/features/DebugSession.ts +++ b/src/features/DebugSession.ts @@ -68,8 +68,10 @@ export class DebugSessionFeature implements IFeature, DebugConfigurationProvider const platformDetails = getPlatformDetails(); const versionDetails = this.sessionManager.getPowerShellVersionDetails(); - if (platformDetails.operatingSystem !== OperatingSystem.Windows) { - const msg = "Attaching to a PowerShell Host Process is supported only on 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 on ${ + OperatingSystem[platformDetails.operatingSystem] } requires PowerShell 6.2 or higher.`; return vscode.window.showErrorMessage(msg).then((_) => { return undefined; });