Skip to content
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

PowerShell extension crashes when running large scripts in VS Code 1.97.2 #5141

Open
6 tasks done
c01d43am opened this issue Feb 20, 2025 · 2 comments
Open
6 tasks done
Labels
Area-Engine Issue-Bug A bug to squash. Needs: Maintainer Attention Maintainer attention needed!

Comments

@c01d43am
Copy link

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

When running large scripts in the PowerShell extension for VS Code, the terminal becomes unresponsive, and execution stops unexpectedly. I expected the script to run fully without crashes, but VS Code freezes instead.

PowerShell Version

Name                           Value                                                                                   
----                           -----                                                                                   
PSVersion                      5.1.26100.2161                                                                          
PSEdition                      Desktop                                                                                 
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                 
BuildVersion                   10.0.26100.2161                                                                         
CLRVersion                     4.0.30319.42000                                                                         
WSManStackVersion              3.0                                                                                     
PSRemotingProtocolVersion      2.3                                                                                     
SerializationVersion           1.1.0.1

Visual Studio Code Version

1.97.2
x64

Extension Version

ms-vscode.powershell@2025.0.0

Steps to Reproduce

Open VS Code (code .)
Install PowerShell extension (ms-vscode.powershell@2025.0.0)
Open a large PowerShell script (.ps1 file with >1000 lines)
Run the script (F5 or Ctrl + F5)
VS Code terminal freezes, and no output is displayed.
"The script should execute successfully without freezing the VS Code terminal."

Visuals

No response

Logs

No response

@c01d43am c01d43am added Issue-Bug A bug to squash. Needs: Triage Maintainer attention needed! labels Feb 20, 2025
@JustinGrote
Copy link
Collaborator

Thanks for your submission!

Can you record a reproduction? You can use Win-Shift-R on Windows 11 to start recording, and you can paste the result directly into the issue or a comment reply.

Also please capture logs at the trace level as per the guidance.

@JustinGrote JustinGrote added Area-Engine Needs: Author Feedback Please give us the requested feedback! and removed Needs: Triage Maintainer attention needed! labels Feb 20, 2025
@andyleejordan
Copy link
Member

Please note that the Extension Terminal will by design be tied up while the script is executing, as it's what's executing it.

@github-actions github-actions bot added Needs: Maintainer Attention Maintainer attention needed! and removed Needs: Author Feedback Please give us the requested feedback! labels Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Engine Issue-Bug A bug to squash. Needs: Maintainer Attention Maintainer attention needed!
Projects
None yet
Development

No branches or pull requests

3 participants