VSCode无法在WSL2中启动

ffdz8vbo  于 4个月前  发布在  Vscode
关注(0)|答案(1)|浏览(92)

这个问题是否在所有扩展都被禁用时发生?:是/否

  • VS Code 版本:1.86.0
  • OS 版本:Windows 11 Pro 22H2

重现步骤:

  1. 打开 Ubuntu-22.04 终端
  2. 输入 code 。
  3. Code 以错误状态打开
[2024-02-02 16:15:29.594] Extension version: 0.86.0
[2024-02-02 16:15:29.594] L10N bundle: undefined
[2024-02-02 16:15:29.602] authorityHierarchy: wsl+Ubuntu-22.04
[2024-02-02 16:15:29.602] WSL extension activating for a local WSL instance
[2024-02-02 16:15:29.607] Resolving wsl+Ubuntu-22.04, resolveAttempt: 1
[2024-02-02 16:15:29.608] NodeExecServer run: C:\WINDOWS\System32\wsl.exe --status
[2024-02-02 16:15:29.698] WSL feature installed: true (wsl --status)
[2024-02-02 16:15:29.699] NodeExecServer run: C:\WINDOWS\System32\wsl.exe --list --verbose
[2024-02-02 16:15:29.791] 2 distros found
[2024-02-02 16:15:29.792] Starting VS Code Server inside WSL (wsl2)
[2024-02-02 16:15:29.792] Windows build: 22621. Multi distro support: available. WSL path support: enabled
[2024-02-02 16:15:29.792] Scriptless setup: false
[2024-02-02 16:15:29.806] NodeExecServer run: C:\WINDOWS\System32\wsl.exe -d Ubuntu-22.04 -e sh -c [ -f '/tmp/vscode-distro-env.dqjHkG' ] && cat '/tmp/vscode-distro-env.dqjHkG' || echo ''
[2024-02-02 16:15:29.947] Using shell environment from invoking shell: /tmp/vscode-distro-env.dqjHkG
[2024-02-02 16:15:29.979] WSL daemon log file: 
[2024-02-02 16:15:29.982] Probing if server is already installed: if [ -d ~/.vscode-server/bin/05047486b6df5eb8d44b2ecd70ea3bdf775fd937 ]; then printf 'install-found '; fi; if [ -f /etc/alpine-release ]; then printf alpine-; fi; uname -m
[2024-02-02 16:15:29.982] NodeExecServer run: C:\WINDOWS\System32\wsl.exe -d Ubuntu-22.04 -e sh -c if [ -d ~/.vscode-server/bin/05047486b6df5eb8d44b2ecd70ea3bdf775fd937 ]; then printf 'install-found '; fi; if [ -f /etc/alpine-release ]; then printf alpine-; fi; uname -m
[2024-02-02 16:15:30.111] Probing result: install-found x86_64
[2024-02-02 16:15:30.112] Server install found in WSL
[2024-02-02 16:15:30.112] NodeExecServer run: C:\WINDOWS\System32\wsl.exe -d Ubuntu-22.04 sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" 05047486b6df5eb8d44b2ecd70ea3bdf775fd937 stable code-server .vscode-server --host=127.0.0.1 --port=0 --connection-token=1384870649-363185087-3615778268-1827744700 --use-host-proxy --without-browser-env-var --disable-websocket-compression --accept-server-license-terms --telemetry-level=all'
[2024-02-02 16:15:30.247] Setting up server environment: Looking for /home/myuser/.vscode-server/server-env-setup. Not found.
[2024-02-02 16:15:30.247] WSL version: 5.15.133.1-microsoft-standard-WSL2 Ubuntu-22.04
[2024-02-02 16:15:30.247] WSL-shell-PID: 1392
[2024-02-02 16:15:30.248] Node executable: /home/myuser/.vscode-server/bin/05047486b6df5eb8d44b2ecd70ea3bdf775fd937/node
[2024-02-02 16:15:30.248] Starting server: /home/myuser/.vscode-server/bin/05047486b6df5eb8d44b2ecd70ea3bdf775fd937/bin/code-server --host=127.0.0.1 --port=0 --connection-token=1384870649-363185087-3615778268-1827744700 --use-host-proxy --without-browser-env-var --disable-websocket-compression --accept-server-license-terms --telemetry-level=all
[2024-02-02 16:15:30.248] For help with startup problems, go to https://code.visualstudio.com/docs/remote/troubleshooting#_wsl-tips
[2024-02-02 16:15:30.248] NodeExecServer run: C:\WINDOWS\System32\wsl.exe -d Ubuntu-22.04 -e kill 1392
[2024-02-02 16:15:41.003] Download in background is enabled
[2024-02-02 16:16:11.009] Update check by another window detected, skipping

我尝试删除了 ~/.vscode 文件夹并重新安装了 WSL 扩展,但我一直得到这个

jk9hmnmh

jk9hmnmh1#

我正在经历同样的问题,但只在从Ubuntu 18.04开始的发行版中出现,我一直在更新到最新版本。我还有一个全新的22.04发行版,那个版本与VSC(至少目前是这样)配合得很好。
希望这能帮助识别问题所在。

相关问题