Unfolding not always possible
See original GitHub issueIssue Description
Since the last update of the PowerShell Preview extension there is an issue with unfolding certain code blocks. When refactoring some code you will see that pressing CTRL + 0
will collapse all regions but sometimes it’s no longer possible to expand the regions by clicking on the arrow in front of the collapsed code. When doing this nothing is unfolding and after 10 to 15 seconds it does unfold sometimes, but not always.
It’s pretty hard to replicate this as it happens randomly but quite often. Usually I run a Pester test script to test a script and then when I come back the folding becomes an issue.
System Details
VSCode version:
1.43.0-insider d1c48c103cabc6e729f59787c0b9c86fb3d39e73 x64
VSCode extensions:
Angular.ng-template@0.900.14 dbaeumer.vscode-eslint@2.1.1 EditorConfig.EditorConfig@0.14.4 eg2.vscode-npm-script@0.3.11 esbenp.prettier-vscode@3.20.0 humao.rest-client@0.23.1 johnpapa.angular-essentials@9.0.1 johnpapa.Angular2@9.1.1 johnpapa.vscode-peacock@3.5.0 johnpapa.winteriscoming@1.3.0 mikestead.dotenv@1.0.1 ms-azuretools.vscode-cosmosdb@0.12.1 ms-vscode.azure-account@0.8.8 ms-vscode.powershell-preview@2020.2.0 msjsdiag.debugger-for-chrome@4.12.6 msjsdiag.debugger-for-edge@1.0.14 nrwl.angular-console@11.1.3 PKief.material-icon-theme@4.0.1 streetsidesoftware.code-spell-checker@1.8.0 xabikos.JavaScriptSnippets@1.7.2
PSES version: 2.0.0.0
PowerShell version:
Name Value
PSVersion 5.1.14393.3471 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} BuildVersion 10.0.14393.3471 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:45 (16 by maintainers)
Top GitHub Comments
I made something to help reproduce. I don’t know if this the same source of the problem that @DarkLite1 have as he works locally and with not that meany folders but it could be the same thing maybe amplified by some factor.
Locally on SSD it freezes for me from 5-30 seconds. On network share it freezes for longer then I was willing to wait (: So it happens when you have many subfolders and only if you have a function defined in your script.
Hope this helps
I have spent an hour trying to pinpoint the cause of the problem, it looks like the number of files in your VSCode open folder dose not effect the problem but the number of subfolders do. @DarkLite1 how many subfolders do you have? I can see that with 10,000 subfolders locally it freezes for ~30 seconds and on a network share with 3000 subfolders it freezes for a minute +