Skip to content

Stepping too fast in the debugger causes a hang on Windows #1183

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
TylerLeonhardt opened this issue Feb 1, 2018 · 16 comments
Closed

Stepping too fast in the debugger causes a hang on Windows #1183

TylerLeonhardt opened this issue Feb 1, 2018 · 16 comments
Assignees

Comments

@TylerLeonhardt
Copy link
Member

This was opened as a result of closing #156 (comment)

Stepping too fast in the debugger causes a hang on Windows.

Repro steps

  1. on Windows open VSCode and debug a script that has a while loop or some loop.
  2. Press and hold down F10 to step over.

The debugging session will hang and you will not be able to continue debugging. All of the debugging options will not work.

@JamesLear92
Copy link

Yeah, this pesters me too.

@brianrreed
Copy link

I am seeing the same issue.

@hoetz
Copy link

hoetz commented Dec 6, 2018

This happens to me as well but it only came up in the last month or so. When I hit F10 really fast the session almost always crashes.

Here is my EditorServices.log https://gist.github.com/hoetz/ebc0cdf889ce86ec64022ed0614b14d1

This is my vscode-powershell.log

12/6/2018 11:44:30 AM [NORMAL] - Path specified by 'powerShellExePath' setting - '' - not found, reverting to default PowerShell path.
12/6/2018 11:44:30 AM [NORMAL] - Language server starting --
12/6/2018 11:44:30 AM [NORMAL] - exe: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
12/6/2018 11:44:30 AM [NORMAL] - args: C:\Users\flo.vscode\extensions\ms-vscode.powershell-1.10.0\modules\PowerShellEditorServices\Start-EditorServices.ps1 -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '1.10.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'C:\Users\flo.vscode\extensions\ms-vscode.powershell-1.10.0\modules' -EnableConsoleRepl -LogLevel 'Normal' -LogPath 'C:\Users\flo.vscode\extensions\ms-vscode.powershell-1.10.0\logs\1544093070-323e7eab-7c56-4501-b9e3-09020ca276001544093066202\EditorServices.log' -SessionDetailsPath 'C:\Users\flo.vscode\extensions\ms-vscode.powershell-1.10.0\sessions\PSES-VSCode-6932-919620' -FeatureFlags @()
12/6/2018 11:44:30 AM [NORMAL] - powershell.exe started, pid: 10624
12/6/2018 11:44:34 AM [NORMAL] - Language server started.
12/6/2018 11:44:34 AM [NORMAL] - {"languageServiceTransport":"NamedPipe","languageServicePipeName":"\\.\pipe\PSES_qth3mhkg.5mp","debugServiceTransport":"NamedPipe","status":"started","debugServicePipeName":"\\.\pipe\PSES_305zfmut.yua"}
12/6/2018 11:44:34 AM [NORMAL] - Connecting to language service on pipe \.\pipe\PSES_qth3mhkg.5mp...
12/6/2018 11:44:34 AM [NORMAL] - Language service connected.
12/6/2018 11:46:15 AM [NORMAL] - powershell.exe terminated or terminal UI was closed
12/6/2018 11:49:07 AM [NORMAL] - Path specified by 'powerShellExePath' setting - '' - not found, reverting to default PowerShell path.
12/6/2018 12:46:23 PM [NORMAL] - Shutting down language client…

Environment Information

Visual Studio Code

Name Version
Operating System Windows_NT x64 10.0.17134
VSCode 1.29.1
PowerShell Extension Version 1.10.0

PowerShell Information

Name Value
PSVersion 5.1.17134.407
PSEdition Desktop
PSCompatibleVersions 1.0 2.0 3.0 4.0 5.0 5.1.17134.407
BuildVersion 10.0.17134.407
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

@yobyot
Copy link

yobyot commented Dec 7, 2018

@TylerLeonhardt Thanks for asking. Yes...there's something basic that causes the debugger to crash/quit/hang. I've seen it across platforms (Windows, macOS) and PowerShell releases (5.1 and core 6.x on macOS).

On Windows, I can cut and paste the script into the ISE and it'll debug perfectly. It's the one thing that has me worried about the death of PowerShell desktop: this debugger still is, ahem, buggy.

@ili101
Copy link

ili101 commented Jan 1, 2019

Hi guys, can you please look at this bug? It's very annoying to have your console cash in the middle of a long debug.
error

@TylerLeonhardt
Copy link
Member Author

Thanks for the info! Can you also attach the logs here so we can get a better idea of what's going on?

@ili101
Copy link

ili101 commented Jan 1, 2019

@fourpastmidnight
Copy link

In addition to the console crashing, I've also had the session seem to just become "detached". I.e. the debugger still thinks it's debugging, but you can't step into/over/out of anything, nor F8 to continue execution. Thankfully, hitting Stop does seem to work so that I can restart the debugging session.

@tloveland1
Copy link

I get this issue constantly. If I step faster than ~once per second, the powershell / debugging session crashes

@tloveland1
Copy link

I've gotten the issue @fourpastmidnight describes quite often as well.

@pwahlmueller
Copy link

I still have this issue with the actual versions (code 1.42.2 and powershell 2020-01). Very annoying as the system may then be partially in an inconsistent state - I then have to clean things up before I can debug again.

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Feb 23, 2020
@rjmholt
Copy link
Contributor

rjmholt commented Feb 23, 2020

powershell 2020-01

Give powershell-preview 2020.2.0 a try. A large number of debugging issues have been solved in that. Changes there are being released to stable alongside PowerShell 7 next month.

@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label Feb 25, 2020
@SydneyhSmith
Copy link
Collaborator

Sounds like this has been fixed in our latest preview release so I will close for now. Thanks!

@yobyot
Copy link

yobyot commented Feb 25, 2020

With all due respect we don’t know if this issue — a long-standing one that makes debugging scripts difficult — is actually fixed.

Can we leave this open until we have some evidence?

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Feb 25, 2020
@rjmholt rjmholt self-assigned this Feb 25, 2020
@SydneyhSmith
Copy link
Collaborator

We have closed it given that there is no current action item for us on this issue, and we use this to track our work items...if we have evidence that it is persistent we are always happy to re-open

@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label Feb 25, 2020
@pwahlmueller
Copy link

Have tried it with 2020-02 powershell-preview on one machine - could not reproduce the issue any longer.

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Feb 26, 2020
@TylerLeonhardt TylerLeonhardt removed the Needs: Maintainer Attention Maintainer attention needed! label Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests