Skip to content

turn off non-windows gate for attach to process #1736

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion src/features/DebugSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we should change this message to indicate it's is supported on Windows and PowerShell Core >= 6.2.0.

Copy link
Member Author

@TylerLeonhardt TylerLeonhardt Jan 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow duh. Thoughts on this?

Suggested change
const msg = "Attaching to a PowerShell Host Process is supported only on Windows.";
const msg = "Attaching to a PowerShell Host Process is supported on Windows and PowerShell Core 6.2 and up on Non-Windows.";

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this instead:

Attaching to a PowerShell Host Process on ${osName} requires PowerShell 6.2 or higher.

return vscode.window.showErrorMessage(msg).then((_) => {
return undefined;
Expand Down