-
Notifications
You must be signed in to change notification settings - Fork 511
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
turn off non-windows gate for attach to process #1736
Conversation
src/features/DebugSession.ts
Outdated
@@ -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."; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
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."; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* turn off non-windows gate for attach to process * address feedback * no single quotes
PR Summary
As of 6.2.0-preview.4
Enter-PSHostProcess
andGet-PSHostProcessInfo
both work on Non-Windows so I've modified the check to allow folks with 6.2.0 and higher to use the Attach to process debug config.We try to only support the latest preview of PowerShell since it gets hairy to maintain all of the previews... if you feel like I should make the check more robust, let me know! However, I don't know the % of people who would be on preview.X and try using Enter-PSHostProcess.
PR Checklist
Note: Tick the boxes below that apply to this pull request by putting an
x
between the square brackets.Please mark anything not applicable to this PR
NA
.WIP:
to the beginning of the title and remove the prefix when the PR is ready