PowerShell / PowerShell/vscode-powershell
VS Code makes no progress when trying to debug a PS script when there's an invalid "watch" variable set
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 547
- PR merge metrics
- No merged PRs in 30d
Description
Prerequisites
- I have written a descriptive issue title.
- I have searched all issues to ensure it has not already been reported.
- I have read the troubleshooting guide.
- I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
Summary
I am trying to debug a VS script, which freezes VS Code. The "pause" button does not work, neither does "restart". The "stop" button seems to stop things, but I starting debugging again does nothing. Restarting Code lets me hit the first bp I have set, but continuing gets me back in the stuck state. I've narrowed this down to an innocent looking "watch" statement I've previously set from the VS Code context menu on one of the autos. Removing the watch makes things work again.
PowerShell Version
$PsVersionTable
Name Value
---- -----
PSVersion 7.1.5
PSEdition Core
GitCommitId 7.1.5
OS Microsoft Windows 10.0.19043
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visual Studio Code Version
code --version
1.61.1
c13f1abb110fc756f9b3a6f16670df9cd9d4cf63
x64
Extension Version
code --list-extensions --show-versions | Select-String powershell
ms-vscode.powershell@2021.10.0
Steps to Reproduce
.
Visuals
No response
Logs
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file, test, or reproducible command is named. Start by reproducing the freeze in VS Code with PowerShell 7.1.5, the listed extension and an invalid watch expression, then compare debugging behavior with and without that watch. Done means pause, restart, stop, and continue work reliably in the reported scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100