question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Powershell debugger is freezing in VS code

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
olegk25commented, Sep 7, 2021

well, no luck catching it again so far… Maybe it was something else. Closing the ticket as non-reproducible

1reaction
olegk25commented, Sep 3, 2021

Hello @andschwa , I’ve found a workaround by removing (disabling did not help) all other extensions. Now I’ll be adding them back and see if I can reproduce the issue again. And thank you for the diagnostics tip 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Powershell debugger hangs stepping over a script invocation
VS Code : Version: 1.58.1. ms-vscode.powershell: v2021.6.2 ... stepped over the first two lines and try to step to the Write-Host line, the...
Read more >
VsCode hangs/freezes with "Starting up powershell" in status ...
Sometimes starting up VsCode to debug a file, the PowerShell extension hangs and the VsCode terminal Window has a status bar message ...
Read more >
VSCode integrated powershell terminal freezing because of ...
Hi, I've been struggling with VSCode for a long time. It seems to be something that the integrated terminal is doing.
Read more >
PowerShell freeze in "Open In Terminal"
[severity:It bothers me. A fix would be nice] Select “Open In Terminal” with Solution Explorer Right Click menu. Terminal window stopped.
Read more >
Troubleshooting and known issues (VS Tools for Unity)
Confirm that Code Optimization On Startup is set to Debug . · Or select the External Tools tab. Confirm that the Editor Attaching...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found