Skip to content
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

Debugging C# - VSCode hangs when breakpoint hit #116865

Closed
RandScullard opened this issue Feb 17, 2021 · 6 comments
Closed

Debugging C# - VSCode hangs when breakpoint hit #116865

RandScullard opened this issue Feb 17, 2021 · 6 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) under-discussion Issue is under discussion for relevance, priority, approach

Comments

@RandScullard
Copy link

Issue Type: Bug

  • I am using VSCode to debug my C# ASP.NET Core project running on Kestrel on my Windows laptop.
  • I set a breakpoint in my C# code and trigger the feature in my app (in the browser) that causes that breakpoint to be hit.
  • I see VSCode's task bar button begin to flash, indicating that the breakpoint has been hit.
  • I click the task bar button to bring VSCode to the foreground.
  • VSCode is hung - the entire UI is non-responsive. The line with the breakpoint is not highlighted.
  • I click back on the browser window and VSCode immediately becomes responsive again and highlights the line with the breakpoint. I can then work with the debugger, which works fine until the next time a breakpoint is hit; then the whole process repeats.

This sequence of steps happens the same way every time. I have tried a sample ASP.NET Core project and got the same behavior, so it is nothing specific to my code. I have also tried disabling all extensions except the C# extension (required for debugging) and it still happens.

VS Code version: Code 1.53.2 (622cb03, 2021-02-11T11:48:04.245Z)
OS version: Windows_NT x64 10.0.19042

System Info
Item Value
CPUs Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2592)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: enabled
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.71GB (18.94GB free)
Process Argv --crash-reporter-id 28325b46-87fa-4884-ae6b-3bd5373edc01
Screen Reader no
VM 67%
Extensions (11)
Extension Author (truncated) Version
vscode-sqlite ale 0.11.1
awarest-align awa 1.1.0
markdown-preview-github-styles bie 0.1.6
vscode-eslint dba 2.1.14
EditorConfig Edi 0.16.4
rainbow-csv mec 1.8.1
git-graph mhu 1.28.0
csharp ms- 1.23.9
powershell ms- 2020.6.0
vscode-gitextensions pmi 1.1.0
local-history xyz 1.8.1
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstry244cf:30256637
pythonvsdeb440:30248342
pythonvsded773:30248341
vstes627cf:30244335
pythonvspyt875:30251590

@avenmore
Copy link

I'm also seeing this when a "debugger" statement is hit in my Vue script section. The behavior reminds me of my Win32 days when we would call LockWindowUpdate() while doing some messy painting to reduce flicker, and it didn't get unlocked. I'm now in the habit of doing a quick double Alt-Tab or double tapping the Windows key (to bring up/hide the Start menu) which has the effect of unlocking it.

@weinand weinand assigned isidorn and unassigned weinand Feb 18, 2021
@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label Feb 18, 2021
@isidorn
Copy link
Contributor

isidorn commented Feb 18, 2021

Sounds related to this #114459
Since we use the electron focus window API. Also assigning to @deepak1556 since he would know if we should close this as duplicate

@isidorn isidorn added under-discussion Issue is under discussion for relevance, priority, approach and removed debug Debug viewlet, configurations, breakpoints, adapter issues labels Feb 18, 2021
@avenmore
Copy link

It certainly is the same issue as #116615 which was closed as a duplicate of #114459, and starting with code --disable-features=CalculateNativeWinOcclusion solves the problem for me too, so I would say yes, this is a duplicate of that issue.

@isidorn
Copy link
Contributor

isidorn commented Feb 18, 2021

Thanks for letting us know. Then let's close as duplicate, and if @deepak1556 thinks I am mistaken we can reopen

@isidorn isidorn closed this as completed Feb 18, 2021
@isidorn isidorn added the *duplicate Issue identified as a duplicate of another issue(s) label Feb 18, 2021
@deepak1556
Copy link
Collaborator

Nope all good, thanks for triaging the issue!

@RandScullard
Copy link
Author

Confirmed that code --disable-features=CalculateNativeWinOcclusion fixes the problem on my system. Thanks for your help!

@github-actions github-actions bot locked and limited conversation to collaborators Apr 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

No branches or pull requests

5 participants