microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
161.85k stars 28.45k forks source link

Keyboards shortcuts stops working from time to time #191178

Open joandrsn opened 1 year ago

joandrsn commented 1 year ago

Sometimes when I have used vscode for a while, my keyboard shortcuts semi-stops working. An example: I can Ctrl+F to find, focus is moved but then Enter (to find next result) does not work in the search context.

The issue happens every so often. Sometimes 3-4 times a week, other weeks only once.

I am able to fix the issue by running the command Developer: Toggle Keyboard Shortcuts Troubleshooting. I believe this restarts some process.

In the output window, I find the following stacktrace which may help you:

2023-08-24 07:49:05.561 [error] Specified argument was out of the range of valid values. (Parameter 'index'): CodeExpectedError: Specified argument was out of the range of valid values. (Parameter 'index')
    at r.Q (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:908:39015)
    at vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:908:38554
    at async A.sendBreakpoints (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1859:10046)
    at async vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1861:77830
    at async Promise.all (index 0)
    at async Q (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1861:81679)
    at async J.mb (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1861:77775)

I suspect that I have some extensions clashing on Keyboard shortcuts or a timing issue - but I am very uncertain of this. I am not able to run vscode without extensions, since I have not found a way to reproduce the issue just yet.

VSCodeTriageBot commented 1 year ago

Thanks for creating this issue! We figured it's missing some basic information, such as a version number, or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.

Happy Coding!

joandrsn commented 1 year ago

Version info:

Version: 1.81.1 (system setup) Commit: 6c3e3dba23e8fadc360aed75ce363ba185c49794 Date: 2023-08-09T22:22:42.175Z Electron: 22.3.18 ElectronBuildId: 22689846 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.22000

bvbeek commented 11 months ago

Same problem here, it's driving me crazy. After Reload Window it works again for a while.

Version: 1.81.1 (system setup) Commit: 6c3e3dba23e8fadc360aed75ce363ba185c49794 Date: 2023-08-09T22:22:42.175Z Electron: 22.3.18 ElectronBuildId: 22689846 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.20348

joandrsn commented 11 months ago

I notice that you @bvbeek have forked Microsoft/BCTech. Are you by any chance a D365 BC developer? Because I am.

Since we both experience the issue, the issue may be related to the AL Language extension. Unfortunatly the VSCode extension is not open source and thus harder to debug.

bvbeek commented 11 months ago

Hi @joandrsn , yes I'm also a BC developer. However my colleagues do not experience this problem. These are my installed VS Code extensions. Which one have you installed?

image

joandrsn commented 11 months ago

I have 24 extensions installed. Of these, the overlap with your extensions are only the following:

bvbeek commented 11 months ago

I've disabled these two extensions, and I still got this issue: AZ AL Dev Tools/AL Code Outline - Source code waldo's CRS AL Language Extension - Source code

So the problem is in: AL Language extension for Microsoft Dynamics 365 Business Central

However, I'm not able to disable this because we need this to develop :)

ulugbekna commented 11 months ago

@bvbeek Does disabling AL Language extension fixes the problem for you?

ulugbekna commented 11 months ago

The problem is likely caused by use of webviews. If you could come up with a repro for this, I could investigate more into the issue