-
Notifications
You must be signed in to change notification settings - Fork 29.3k
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
VSCode intermittently stops accepting input #148661
Comments
Normally, Backspace dispatching would look like this:
The only context key it has is You mention that this reproduces when debugging a script which throws. Is the VS Code window becoming "auto-focused" or blinking in the taskbar or something unusual like that when the problem appears? |
No blinking, and VSCode has focus in Windows. Below is a screenshot of when it is actively happening. This time I noticed that it did not accept directional arrow input, but did accept letter keystrokes. As in, a + leftarrow + b + c + backspace would produce 'abc' at the location of the cursor, instead of 'ba'. It seems that the keys that are or are not accepted are consistent. Directional arrows and backspace always break and letter keys always work when the issue occurs. My hunch is that something in the KeybindingService is intercepting and consuming "special" keys. The intermittent nature of this smells very much like a race condition. I noticed that the issue does not occur on my older computer ever. The computer this happens on is very new and has 128GB RAM, a 2TB M.2 drive, and a brand new Intel processor. It's possible that during testing and for 99% of users, their computers do not trigger the race, but my computer is CPU fast enough or storage fast enough to make the race relevant. Is the debugger on its own thread? It may be that the issue is that I have two VSCode windows open at the same time. The second window is for my remote CentOS machine. Below is a screenshot of the un-focused CentOS VSCode window at the time of repro, which has an active error box because my VPN connection timed out. Seems like a stretch but maybe this is related in some roundabout way. |
This is consistent with the workbench not realising it has focus. This manifests itself as
Yes, I think this is very relevant. Normally, this dialog box should steal your focus and be revealed. I think that perhaps in this case the dialog box manages to only partially steal the focus. @deepak1556 Do you have any ideas? It looks like the second window is showing a native dialog and that one fails to steal focus correctly. |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
This would be a side effect of the occlusion tracker on windows, we have had similar reports of the workbench process being incorrectly suspended during debugging #123257 @ColinBundschu can you try launching the application with |
That fixes it |
I am not sure what causes it - it seems to happen intermittently. It is fixed if I change to a different app then come back to VSCode.
REPRO:
[2022-05-03 17:01:11.112] [renderer1] [info] [KeybindingService]: / Received keydown event - modifiers: [], code: Backspace, keyCode: 8, key: Backspace
[2022-05-03 17:01:11.112] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [], code: Backspace, keyCode: 1 ('Backspace')
[2022-05-03 17:01:11.113] [renderer1] [info] [KeybindingService]: | Resolving Backspace
[2022-05-03 17:01:11.113] [renderer1] [info] [KeybindingService]: \ From 1 keybinding entries, no when clauses matched the context.
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonvspyt551cf:30345471
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
cppdebugcf:30475217
The text was updated successfully, but these errors were encountered: