Skip to content

Powershell debugger is freezing in VS code #3539

@olegk25

Description

@olegk25

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

PowerShell debugger becomes absolutely irresponsive after ANY breakpoint stop.

PowerShell Version

Name                           Value                                                                                                                         
----                           -----                                                                                                                         
PSVersion                      5.1.19041.1151                                                                                                                
PSEdition                      Desktop                                                                                                                       
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                       
BuildVersion                   10.0.19041.1151                                                                                                               
CLRVersion                     4.0.30319.42000                                                                                                               
WSManStackVersion              3.0                                                                                                                           
PSRemotingProtocolVersion      2.3                                                                                                                           
SerializationVersion           1.1.0.1

Visual Studio Code Version

Extension version: 2021.8.2
VS Code version: Code 1.59.0 (379476f0e13988d90fab105c5c19e7abc8b1dea8, 2021-08-04T23:13:12.822Z)
OS version: Windows_NT x64 10.0.19042
Restricted Mode: No

Extension Version

ms-vscode.powershell@2021.8.2

Steps to Reproduce

Consider a very simple script like

Get-ChildItem -Path 'c:' | ForEach-Object {
$f = $_.FullName
$f
}

  1. Put a breakpoint on line 2 ($f = $_.FullName) and hit F5.
  2. The breakpoint is reached.
  3. Hit the Step Over (F10) - debugger hangs. the same is with F5

c

Visuals

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions