Skip to content

Get-Help -ShowWindow causes window to appear below VS Code #913

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

Closed
tmmuessig opened this issue Jun 22, 2017 · 3 comments
Closed

Get-Help -ShowWindow causes window to appear below VS Code #913

tmmuessig opened this issue Jun 22, 2017 · 3 comments
Labels
Issue-Bug A bug to squash.

Comments

@tmmuessig
Copy link

System Details

  • Operating system name and version: Windows 10 Version 1703 (OS Build 15063.413)

code -v =1.13.1 379d2efb5539b09112c793d3d9a413017d736f89
$pseditor.EditorServicesVersion
code --list-extensions --show-versions = [email protected]
$PSVersionTable =
Name Value


PSVersion 5.1.15063.413
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.15063.413
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1


### Issue Description

I use PowerShell help with the -ShowWindow parameter.  This does not appear to work in VS Code.  Would be nice if this worked the same way as the shell or ISE does and enable me to have a popup window that allows me to see the help and my code as the same time.

When I run Help Get-Command -ShowWindow nothing is returned. 

@daviwil
Copy link
Contributor

daviwil commented Jun 22, 2017

Hey Tim, the window does actually appear, it just shows up below the VS Code window. Try hitting Alt-Tab or looking in your taskbar, you'll find it.

Definitely need to fix the issue where it doesn't show up on top, though, I'll look into that for the next patch update.

@daviwil daviwil changed the title Help ShowWindow Get-Help -ShowWindow causes window to appear below VS Code Jun 22, 2017
@daviwil daviwil added Area-General Issue-Bug A bug to squash. labels Jun 22, 2017
@daviwil daviwil added this to the 1.4.1 milestone Jun 22, 2017
@tmmuessig
Copy link
Author

tmmuessig commented Jun 22, 2017 via email

@daviwil daviwil modified the milestones: 1.4.2, 1.5.1 Aug 24, 2017
@daviwil daviwil modified the milestones: 1.5.1, Future Oct 26, 2017
@rkeithhill
Copy link
Contributor

From my testing, I believe this was executed in the normal PowerShell terminal and not PoweShellEditorServices. The PowerShell terminal is not related to this extension. It is just regular PowerShell running in a VSCode terminal window. This has to do with the fact $host.PrivateData["Window"] returns $null in the PowerShell terminal. If PowerShell has no Window to attach the help window to, it will attach it to the desktop. Unfortunately, that will not cause the window to appear on top of VSCode.

Further, if you try this in the PowerShell Integrated Console, you will get an error. See #753

I'm closing this issue as there is nothing the extension can do about the interaction between VSCode and the installed version of Windows PowerShell you're using in the terminal window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug A bug to squash.
Projects
None yet
Development

No branches or pull requests

3 participants