Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/features/DebugSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
Expand Down