Skip to content

Powershell debugger is freezing in VS code #3539

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

Closed
4 tasks done
olegk25 opened this issue Aug 31, 2021 · 8 comments
Closed
4 tasks done

Powershell debugger is freezing in VS code #3539

olegk25 opened this issue Aug 31, 2021 · 8 comments
Labels
Issue-Bug A bug to squash.

Comments

@olegk25
Copy link

olegk25 commented Aug 31, 2021

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

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

@olegk25 olegk25 added the Issue-Bug A bug to squash. label Aug 31, 2021
@ghost ghost added the Needs: Triage Maintainer attention needed! label Aug 31, 2021
@olegk25
Copy link
Author

olegk25 commented Aug 31, 2021

image

@olegk25
Copy link
Author

olegk25 commented Aug 31, 2021

vscode-powershell.log:

8/31/2021 4:45:39 PM [NORMAL] - Session file found
8/31/2021 4:45:39 PM [NORMAL] - Registering terminal close callback
8/31/2021 4:45:39 PM [NORMAL] - powershell.exe PID: 24340
8/31/2021 4:45:39 PM [NORMAL] - Language server started.
8/31/2021 4:45:39 PM [NORMAL] - Registering terminal PID log callback
8/31/2021 4:45:39 PM [NORMAL] - Connecting to language service on pipe \.\pipe\PSES_t3wn3kr4.o2c...
8/31/2021 4:45:39 PM [NORMAL] - Language service connected.
8/31/2021 4:45:39 PM [NORMAL] - {"status":"started","languageServiceTransport":"NamedPipe","languageServicePipeName":"\\.\pipe\PSES_t3wn3kr4.o2c","debugServiceTransport":"NamedPipe","debugServicePipeName":"\\.\pipe\PSES_gvv5irya.nib"}
8/31/2021 4:45:41 PM [WARNING] - Invalid Version: null

EditorServices.log:

2021-08-31 16:46:51.922 -04:00 [WRN] Runtime exception occurred while executing command
2021-08-31 16:46:51.927 -04:00 [ERR] Exception occurred while executing debugger command
2021-08-31 16:46:51.928 -04:00 [ERR] Execution of the following command(s) completed with errors:

Get-Variable -Scope 1

2021-08-31 16:46:51.928 -04:00 [WRN] Runtime exception occurred while executing command
2021-08-31 16:46:51.933 -04:00 [ERR] Exception occurred while executing debugger command
2021-08-31 16:46:51.934 -04:00 [ERR] Execution of the following command(s) completed with errors:

Get-Variable -Scope 1

@andyleejordan
Copy link
Member

Hi,

Can you reproduce this using PowerShell Core? I cannot. About to try with Windows PowerShell.

@andyleejordan andyleejordan mentioned this issue Sep 1, 2021
4 tasks
@andyleejordan
Copy link
Member

Also @olegk25 could you please provide more logging and environment information by following these steps? Specifically please turn on diagnostic logging. It's helpful to see where it failed, but I want to know what it was doing as it got to that point.

@andyleejordan andyleejordan added Needs: Repro Info 🤔 and removed Needs: Triage Maintainer attention needed! labels Sep 1, 2021
@olegk25
Copy link
Author

olegk25 commented 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 :)

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Sep 3, 2021
@andyleejordan
Copy link
Member

Hey that's interesting...let me know which one you find that causes the issue!

@andyleejordan andyleejordan removed the Needs: Maintainer Attention Maintainer attention needed! label Sep 3, 2021
@olegk25
Copy link
Author

olegk25 commented Sep 7, 2021

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

@olegk25 olegk25 closed this as completed Sep 7, 2021
@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Sep 7, 2021
@andyleejordan
Copy link
Member

There's a new version of the preview extension out today too!

@StevenBucher98 StevenBucher98 removed the Needs: Maintainer Attention Maintainer attention needed! label Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug A bug to squash.
Projects
None yet
Development

No branches or pull requests

3 participants