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

Running any PowerShell script crashes the terminal before it even launches #5092

Closed
5 of 6 tasks
jsantoro339as opened this issue Nov 18, 2024 · 2 comments
Closed
5 of 6 tasks
Labels
Issue-Bug A bug to squash. Resolution-Duplicate Will close automatically.

Comments

@jsantoro339as
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

Once I try to run vscode and it starts the PowerShell session, it always fails. I have uninstalled all extensions, then I have completely removed vscode including deleting any leftover components. Rebooted and reinstalled vscode. Once I opened the PS1 file it asked me if I wanted to install the PowerShell extension, I did and once installed it immediately crashes and fails with the error hell.EditorServices.Commands.StartEditorServicesCommand.EndProcessing()

My PowerShell script I am using to test is only containing the below line. get-childitem "c:\temp" -depth 0

PowerShell Version

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

Name             : ConsoleHost
Version          : 5.1.22621.4391
InstanceId       : b2ca931a-2fac-41e3-a1bb-a1fcdd2eed43
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : en-US
CurrentUICulture : en-US
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled  : True
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace

Visual Studio Code Version

1.95.2
e8653663e8840adaf45af01eab5c627a5af81807
x64

Extension Version

ms-vscode.powershell@2024.4.0

Steps to Reproduce

I am only creating a new ps1 file and adding the below line

Get-ChildItem c;\temp -depth 0

I get the below error before I execute

Exception encountered starting EditorServices. Exception logged in C:__w\1\s\src\PowerShellEditorServices.Hosting\Commands\StartEditorServicesCommand.cs on line 239 in EndProcessing:
hell.EditorServices.Commands.StartEditorServicesCommand.EndProcessing()

Visuals

image

Logs

vscode_logs.zip

@jsantoro339as jsantoro339as added Issue-Bug A bug to squash. Needs: Triage Maintainer attention needed! labels Nov 18, 2024
Copy link

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

@JustinGrote
Copy link
Collaborator

Dupe of #5084, see there for workarounds until a new release is published.

@JustinGrote JustinGrote added Resolution-Duplicate Will close automatically. and removed Needs: Triage Maintainer attention needed! labels Nov 18, 2024
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. Resolution-Duplicate Will close automatically.
Projects
None yet
Development

No branches or pull requests

2 participants