Change:
if (removedViews.length) { this.viewsRegistry.deregisterViews(removedViews, viewContainer); for (const view of removedViews) { <del> const anyView = view as ICustomTreeViewDescriptor; </del> <ins> const anyView = view as ICustomViewDescriptor; </ins> if (anyView.treeView) { anyView.treeView.dispose(); }

Discussion:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --<!-- Launch with to check. --Does this issue occur when all extensions are disabled?: No <!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported directly to the extension publisher. The 'Help Report Issue' dialog can assist with this. --- Version: 1.81.1 (system setup) Commit: Date: 2023-08-09T22:22:42.175Z Electron: 22.3.18 ElectronBuildId: Chromium: 108.0.5359.215 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0. All previous setting has been clean up ! When opening VSCode and the WSL plugin is enabled, right-clicking on the activity bar on the left side position 1. in figure will cause VSCode to freeze completely. After this happens, VSCode becomes unresponsive to any clicks or key presses. The only way to recover is to right-click on the top menu bar for serval times position 2. in figure. a project using VSCode whether in WSL or not the WSL plugin click on the activity bar on the left side of the interface will hang and become unresponsive !
I'm not able to reproduce. I tried in a remote WSL window, but you write it also happens in a local Window? It you disable the WSL extension, this does not happen?
Yes. This does not happen when WSL extension disable. This is the error output in the devtools console when this happen, hopefully it will be helpful for resolving this issue. !
Thanks, the stacktrace is very helpful. is called with undefined. That happens in I tried to find out how there can be an action with no label, but I wasn't successful.

Clearly there is an invalid action created somewhere reports that he sees this only with the WSL extension enabled. I can't reproduce. I checked that the WSL extension does not contribute any views. I contribute context menus for other locations. I checked that all commands have a title. Are you familiar with the dev tools? Could you debug this? Run In the dev tools got to the tab, press Ctrl+p. In the picker, type (base/common) and open the file. In , set a break point in Now in VS Code open the context menu on the activity bar The breakpoint should be reached. Move the mouse over the and check if it is . You might have to press continue a few times to find the wrong label. Then find out which action has no label !
The Remote Explorer in WSL extension may cause this issue, it has a different label filed. I recorded the debugging, and it might be helpful.
Thank you very much!! The bug is here:
Thank you for solving this issue.