PowerShell Terminal Error in VS Code

Roger Seekell 96 Reputation points
2021-02-19T12:48:01.737+00:00

I am often writing and debugging PowerShell scripts in VS Code. Sometimes as I am stopping and starting script execution (F5), the console will lock up. When I try to press enter to start it again, sometimes the terminal crashes with this error:

The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe '-NoProfile', '-NonInteractive', '-ExecutionPolicy', 'Bypass', '-Command', 'Import-Module 'c:\Users\MYUSER.vscode\extensions\ms-vscode.powershell-2020.6.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2020.6.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\MYUSER.vscode\extensions\ms-vscode.powershell-2020.6.0\modules' -EnableConsoleRepl -StartupBanner "=====> PowerShell Integrated Console v2020.6.0 <===== " -LogLevel 'Normal' -LogPath 'c:\Users\MYUSER.vscode\extensions\ms-vscode.powershell-2020.6.0\logs\1613652411-a3a8fdfa-8c49-4e15-be7a-265713f049be1613652405167\EditorServices.log' -SessionDetailsPath 'c:\Users\MYUSER.vscode\extensions\ms-vscode.powershell-2020.6.0\sessions\PSES-VSCode-13276-359519' -FeatureFlags @() '" terminated with ...

I looked over the provided help link but didn't see anything that made a difference.

What does this error mean and how can I keep PowerShell from locking up in VS Code?

Community Center Not monitored
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.