PowerShell / PowerShell/vscode-powershell

Syntax-based code folding unavailable in virtual workspaces

Open
#4,051 26 comments 1 reaction 2 assignees View on GitHub

@andyleejordan is already working on this.

Since Sep 12, 2022.

  • #5509 by @copilot-swe-agent — closed without merging
Area-Folding Bug: VS Code Pending: External
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 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

I originally opened this bug with the Azure Repo extension team but subsequent troubleshooting shows this issue only occurs when the PowerShell Extension is enabled. I have tried rolling back the PowerShell extension from v2022.6.1 to 2022.5.1 and the issue still occurs. After disabling the PowerShell Extension I can no longer reproduce the error described below.

After connecting to an Azure Repo and trusting the repo in Manage Workspace trust, the code collapse arrows disappear and we cannot collapse various codeblocks. Previously collapsed code expands. Putting the repo back in Restricted mode resolves the issue immediately. We are not having any issues with local files or any files not contained in our Azure Repo. This issue appeared recently and occurs for multiple users on my team and on multiple computers. We have PowerShell scripts in our repo. This issue occurs for us on both the stable and prerelease version of Azure Repo.

Azure Repo Version:

v0.12.0

PowerShell Version
PSVersion                      7.2.5
PSEdition                      Core
GitCommitId                    7.2.5
OS                             Microsoft Windows 10.0.19043
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}       
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Visual Studio Code Version
1.68.1
30d9c6cd9483b2cc586687151bcbcd635f373630
x64
Extension Version
ms-vscode.powershell@2022.6.1
Steps to Reproduce

Install Azure Repos Extension
Install PowerShell Extension
Connect to script hosted in Azure Remote Repo
Collapsing Codeblock works.
Trust Repo in Manage Workspace Trust
Collapsed codeblocks expand, can no longer click collapse.
Set Repo to restricted in Manage Workspace Trust, issue immediately resolves
Disable PowerShell Extension
Reload VSCode
Blocks now collapse as expected in Both Restricted and Trusted Mode

Visuals

RestrictedRepo
TrustedRepo

Logs

Logs sent privately per troubleshooting article.

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.