PowerShell / PowerShell/vscode-powershell

PowerShell Extension combability with VSCode Liveshare - terminal and parameter help auto generation not working as intended

Open
#4,628 0 comments 1 reaction 1 assignee View on GitHub

@SydneyhSmith is already working on this.

Since Jul 19, 2023.

Area-Extension Terminal Issue-Bug
Dominant language
TypeScript
Stars
1.9k
Forks
547
PR merge metrics
No merged PRs in 30d

Description

Prerequisites
  • I have written a descriptive issue title.
  • I have searched all open and closed issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.
Summary

If you are joing a Visual Studio LiveShare Session and use a shared terminal / PowerShell Extention, the terminal does not display the typed text and return values correctly until you resize the terminal (either on host (resize the terminal width) or joiner side (by using toggle content with).

Moreover, the parameter help generation generates the documentation block of the function on the cursor position of the host, if he is in a different file. However, if he is in the same file he is auto focused on the position of the joining person and it gets generated correctly.

I am aware that the issue is related to both PowerShell Extension and VSCode Liveshare, but @SydneyhSmith told me to just raise an issue here.

The issue exists both with the current version of VSCode (1.79.2) and VSCode Preview (1.80.0-insider).

PowerShell Version
$PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.3.4
PSEdition                      Core
GitCommitId                    7.3.4
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}       
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
Visual Studio Code Version
1.79.2
695af097c7bd098fbf017ce3ac85e09bbc5dda06
x64
Extension Version
justin-grote.powershell-extension-pack@0.0.7
ms-vscode.powershell@2023.6.0
TylerLeonhardt.vscode-inline-values-powershell@0.0.7
Steps to Reproduce

Terminal pyramid

do not resize the terminal, otherwise the error does not occur

  • connect to liveshare
  • make the terminal read write
  • the joining person types something in the terminal

Parameter help

  • Connect to a live share session
  • create two different file
  • the sharing person goes to the other file and places their cursor in a random position
  • the joining person types "##" in a function above the parameter block to autogenerate the parameter help
  • The parameter help is generated at the cursor of the generating person
Visuals

If you are using a shared terminal in VSCode Live Share sessions, the PowerShell extension behaves quite weirdly on the joiners side:
image
on the side of the sharing person it looks ok though:
MicrosoftTeams-image (6)

After you click:
image
it works just fine:
image

Additionally, if you whish to have your parameter help auto-generated (using "##"), then it generates the content in the wrong place (where the cursor of the sharing person is):

https://github.com/PowerShell/vscode-powershell/assets/75947402/d4dd7663-2b28-4ddd-a583-859830a95835

Logs

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.