PowerShell Preview is Crashing 2019.11.0
See original GitHub issueIssue Description
I am experiencing a problem with…crashing of extension.
Basically what I did is have an empty .ps1 file. Typed Get-Process to reproduce #2274 ticket, waited. Nothing showed up, pressed enter, and it showed @ as mentioned in #2274 and finally crashed a few seconds later.
I’m opening it as a separate issue as it may be worth try/catch or something. Feel free to close one if it’s the same thing.
Relevant log.
2019-11-04 10:47:28.903 +01:00 [WRN] Runtime exception occurred while executing command:
System.Management.Automation.ParseException: At line:1 char:1
+ @
+ ~
Unrecognized token in source text.
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke[T](IEnumerable input, PSInvocationSettings settings)
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerShell.EditorServices.Services.PowerShellContextService.<ExecuteCommandAsync>d__84`1.MoveNext()
2019-11-04 10:47:28.974 +01:00 [VRB] StartReadLoop called while read loop is already running
2019-11-04 10:47:28.974 +01:00 [VRB] Attempting to execute command(s):
Attached Logs
Follow the instructions in the README about capturing and sending logs.
Environment Information
Visual Studio Code
| Name | Version |
|---|---|
| Operating System | Windows_NT x64 10.0.17763 |
| VSCode | 1.39.2 |
| PowerShell Extension Version | 2019.11.0 |
PowerShell Information
| Name | Value |
|---|---|
| PSVersion | 5.1.17763.771 |
| PSEdition | Desktop |
| PSCompatibleVersions | 1.0 2.0 3.0 4.0 5.0 5.1.17763.771 |
| BuildVersion | 10.0.17763.771 |
| CLRVersion | 4.0.30319.42000 |
| WSManStackVersion | 3.0 |
| PSRemotingProtocolVersion | 2.3 |
| SerializationVersion | 1.1.0.1 |
Visual Studio Code Extensions
Visual Studio Code Extensions(Click to Expand)
| Extension | Author | Version |
|---|---|---|
| beautify | HookyQR | 1.5.0 |
| gitlens | eamodio | 10.1.1 |
| material-icon-theme | PKief | 3.9.1 |
| open-in-browser | techer | 2.0.0 |
| powershell-preview | ms-vscode | 2019.11.0 |
| theme-monokai-pro-vscode | monokai | 1.1.14 |
| vscode-wakatime | WakaTime | 2.2.1 |
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Windows PowerShell crashes after flashing with error ...
Here are a few fixes and suggestions: 1] Run System File Checker 2] Troubleshoot .NET Framework 3] Run Windows PowerShell without the default ......
Read more >PowerShell PowerTip: ISE crashing and auto complete not ...
Have you been having issues with the ISE crashing and not auto completing since windows update 1803? From what I've seen there is...
Read more >PowerShell Preview - Visual Studio Marketplace
Extension for Visual Studio Code - (Preview) Develop PowerShell modules, commands and scripts in Visual Studio Code!
Read more >Kindle crashes and broken PowerShell: Something isn't right ...
The PowerShell issue wouldn't be a problem if it weren't incorporated into a cumulative update; affected users could just roll back the broken ......
Read more >PowerShell crashes on `if ( $? = $false )` - Stack Overflow
Your code is wrong. You are assigning $false to the question mark variable which is a read-only variable. You probably want to replace...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

EditorServices.log
So still haven’t worked out where
PowerShellContextService.ExecuteCommandAsync()is being called in a way that we don’t handle it, but I do have some good info on the@problem. Will share in a more specific thread.