-
Notifications
You must be signed in to change notification settings - Fork 503
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 terminal launches but never gets to a prompt. #5135
Comments
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.
|
Per your log info you're using Windows PowerShell 5.1, which is supported on a best effort basis. Please try changing your extension terminal session (using the command "Show Session Menu") to the PowerShell 7 version you've stated you've installed/updated. |
This issue has been labeled as resolved, please verify the provided fix (or other reason). |
I''m experiencing the exact same issue! Import-Module "C:\Users{Username}.vscode\ms-vscode.powershell-2025.0.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1" Start-EditorServices Nothing happens besides a never ending blinking cursor and the pwsh process is consuming 1 CPU core. |
This issue has been labeled as resolved, please verify the provided fix (or other reason). |
Hi, Could you please provide more logging and environment information by following these steps? Thanks! |
This issue has been labeled as resolved, please verify the provided fix (or other reason). |
Prerequisites
Summary
When i open my powershell script and try and run the script 'F5' the terminal window launches but never gets to a prompts. iv waited over 20 mins.
I have checked AntiVirus etc and re-installed the extension and updated powershell 7 to the latest version. annoyingly it ran last night but not today.
Terminal Prompt:
PowerShell Extension v2025.0.0
Copyright (c) Microsoft Corporation.
https://aka.ms/vscode-powershell
Type 'help' to get help.
PowerShell Version
Visual Studio Code Version
Extension Version
Steps to Reproduce
Open VS Code --> open powershell script file --> launch powershell terminal or run pressing F5. we then see it launches but doesn't complete.
Visuals
No response
Logs
Debug Level Output:
2025-02-02 20:39:53.830 [info] Visual Studio Code: v1.96.4 64-bit on Windows 64-bit
2025-02-02 20:39:53.830 [info] PowerShell Extension: v2025.0.0
2025-02-02 20:39:54.512 [info] Starting 'Windows PowerShell (x64)' at: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
2025-02-02 20:39:55.003 [info] PowerShell process started with PID: 13132
2025-02-02 20:43:50.761 [warning] PowerShell process terminated or Extension Terminal was closed, PID: 13132
2025-02-02 20:43:50.761 [debug] Disposing PowerShell process with PID: 13132
2025-02-02 20:43:51.278 [info] Language service connection closed.
2025-02-02 20:43:51.290 [info] [PSES] [Error - 8:43:51 PM] Server initialization failed.
2025-02-02 20:43:51.291 [info] [PSES] Message: Pending response rejected since connection got disposed
Code: -32097
2025-02-02 20:43:51.291 [info] [PSES] [Error - 8:43:51 PM] Connection to PowerShell Editor Services (the Extension Terminal) was closed. See below prompt to restart!
2025-02-02 20:43:51.291 [info] [PSES] [Error - 8:43:51 PM] PowerShell Editor Services Client client: couldn't create connection to server.
2025-02-02 20:43:51.291 [info] [PSES] Message: Pending response rejected since connection got disposed
Code: -32097
2025-02-02 20:43:51.292 [debug] Session status changing from 'Starting' to 'Failed'.
2025-02-02 20:43:51.292 [error] Never finished startup!
2025-02-02 20:44:19.795 [info] PowerShell Extension Terminal is not active! Running in current terminal using 'runSelectedText'.
2025-02-02 20:44:24.432 [debug] Previously failed, starting again.
2025-02-02 20:44:24.432 [debug] Session status changing from 'Failed' to 'Starting'.
2025-02-02 20:44:24.437 [debug] Finding PowerShell...
2025-02-02 20:44:24.533 [debug] Session status changing from 'Starting' to 'Starting'.
2025-02-02 20:44:24.533 [info] Starting 'Windows PowerShell (x64)' at: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
2025-02-02 20:44:24.534 [debug] Starting process: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -Command Import-Module 'c:\Users\David.vscode\extensions\ms-vscode.powershell-2025.0.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2025.0.0' -BundledModulesPath 'c:\Users\David.vscode\extensions\ms-vscode.powershell-2025.0.0\modules' -EnableConsoleRepl -StartupBanner "PowerShell Extension v2025.0.0
Copyright (c) Microsoft Corporation.
https://aka.ms/vscode-powershell
Type 'help' to get help.
" -LogLevel 'Warning' -LogPath 'c:\Users\David\AppData\Roaming\Code\logs\20250202T203945\window1\exthost\ms-vscode.powershell' -SessionDetailsPath 'c:\Users\David\AppData\Roaming\Code\User\globalStorage\ms-vscode.powershell\sessions\PSES-VSCode-12640-243079.json' -FeatureFlags @()
2025-02-02 20:44:24.852 [info] PowerShell process started with PID: 12892
2025-02-02 20:44:24.852 [debug] Waiting for session file: file:///c%3A/Users/David/AppData/Roaming/Code/User/globalStorage/ms-vscode.powershell/sessions/PSES-VSCode-12640-243079.json
2025-02-02 20:44:27.972 [debug] Session file found.
2025-02-02 20:44:27.974 [debug] Session details: {
"status": "started",
"languageServiceTransport": "NamedPipe",
"languageServicePipeName": "\\.\pipe\PSES_hzz2nij3.21z",
"debugServiceTransport": "NamedPipe",
"debugServicePipeName": "\\.\pipe\PSES_rrmagyrw.lsc",
"powerShellVersion": "5.1.26100.2161"
}
2025-02-02 20:44:27.974 [debug] Connecting to language service...
2025-02-02 20:44:27.977 [debug] Language service connected.
The text was updated successfully, but these errors were encountered: