Repository navigation
Backlog
Labels
Description
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 hit 'Run' button again before the previous run completed, it does nothing but after ending the previous run, it displays this error:

The Run button should not be disabled during a run not terminated ?
Perhaps related to #4332 and #5307
PowerShell Version
$PSVersionTable; $Host
Name Value
---- -----
PSVersion 5.1.26100.9818
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.26100.9818
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Name : Visual Studio Code Host
Version : 2025.4.0
InstanceId : 2e677b62-8b94-432a-a730-9f68efc5bd85
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture : fr-CH
CurrentUICulture : en-US
PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled : True
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspaceVisual Studio Code Version
code --version
1.147.0
8a14f0cc1b08d531eb83255ea3764ae22aa932b5
x64Extension Version
code --list-extensions --show-versions | Select-String powershell
ms-vscode.powershell@2025.4.0Steps to Reproduce
Create a script with this at the end:
Write-Host "Press any key to close..."
$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
Run the script (button 'Run'), don't hit a key, press again the button 'Run', back in terminal press any key
Visuals
No response
Logs
No response
Reacted by github-actions
Activity