Задать вопрос
@ppheizi

Почему не получается подключить VSCode к Remote-WSL?

Всем привет!

Windows 10
WSL2, Ubuntu 24.04.2 LTS
VSCode: 1.101.1 (user setup) и 1.101.1 (system setup)

Я устанавливал как VSCode UserSetup, так и System. Сейчас у меня установлены оба сетапа, проблема возникает на обоих.
Далее нажимаю "connect to wsl (default distro)", но ничего не происходит. Логи выглядят так:
[2025-06-23 01:22:35.013] Extension version: 0.99.0
[2025-06-23 01:22:35.013] L10N bundle: none
[2025-06-23 01:22:35.021] authorityHierarchy: wsl+Ubuntu
[2025-06-23 01:22:35.022] WSL extension activating for a local WSL instance
[2025-06-23 01:22:35.040] Download in background is enabled
[2025-06-23 01:22:35.041] Resolving wsl+Ubuntu, resolveAttempt: 1
[2025-06-23 01:22:35.043] WSL feature installed: true (dll path)
[2025-06-23 01:22:35.043] NodeExecServer run: C:\WINDOWS\System32\wsl.exe --list --verbose
[2025-06-23 01:22:35.102] 1 distros found
[2025-06-23 01:22:35.103] Starting VS Code Server inside WSL (wsl2)
[2025-06-23 01:22:35.103] Windows build: 19045. Multi distro support: available. WSL path support: enabled
[2025-06-23 01:22:35.103] Scriptless setup: false
[2025-06-23 01:22:35.104] No shell environment set or found for current distro.
[2025-06-23 01:22:35.223] WSL daemon log file:
[2025-06-23 01:22:35.224] Probing if server is already installed: if [ -d ~/.vscode-server/bin/18e3a1ec544e6907be1e944a94c496e302073435 ]; then printf 'install-found '; fi; if [ -f /etc/alpine-release ]; then printf 'alpine-'; fi; uname -m;
[2025-06-23 01:22:35.224] NodeExecServer run: C:\WINDOWS\System32\wsl.exe -d Ubuntu -e sh -c if [ -d ~/.vscode-server/bin/18e3a1ec544e6907be1e944a94c496e302073435 ]; then printf 'install-found '; fi; if [ -f /etc/alpine-release ]; then printf 'alpine-'; fi; uname -m;
[2025-06-23 01:22:38.389] Probing result: install-found x86_64
[2025-06-23 01:22:38.390] Server install found in WSL
[2025-06-23 01:22:38.390] NodeExecServer run: C:\WINDOWS\System32\wsl.exe -d Ubuntu sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" 18e3a1ec544e6907be1e944a94c496e302073435 stable code-server .vscode-server --host=127.0.0.1 --port=0 --connection-token=2065008299-3494820575-2419667633-1549338161 --use-host-proxy --without-browser-env-var --disable-websocket-compression --accept-server-license-terms --telemetry-level=all'
[2025-06-23 01:22:38.705] Setting up server environment: Looking for /home/trevor/.vscode-server/server-env-setup. Not found.
[2025-06-23 01:22:38.705] WSL version: 6.6.87.2-microsoft-standard-WSL2 Ubuntu
[2025-06-23 01:22:38.705] WSL-shell-PID: 328
[2025-06-23 01:22:38.705] Node executable: /home/trevor/.vscode-server/bin/18e3a1ec544e6907be1e944a94c496e302073435/node
[2025-06-23 01:22:38.705] Starting server: /home/trevor/.vscode-server/bin/18e3a1ec544e6907be1e944a94c496e302073435/bin/code-server --host=127.0.0.1 --port=0 --connection-token=2065008299-3494820575-2419667633-1549338161 --use-host-proxy --without-browser-env-var --disable-websocket-compression --accept-server-license-terms --telemetry-level=all
[2025-06-23 01:22:39.016] *
[2025-06-23 01:22:39.016] * Visual Studio Code Server
[2025-06-23 01:22:39.016] *
[2025-06-23 01:22:39.016] * By using the software, you agree to
[2025-06-23 01:22:39.016] * the Visual Studio Code Server License Terms (https://aka.ms/vscode-server-license) and
[2025-06-23 01:22:39.016] * the Microsoft Privacy Statement (https://privacy.microsoft.com/en-US/privacystatement).
[2025-06-23 01:22:39.016] *
[2025-06-23 01:22:39.016] Server bound to 127.0.0.1:42027 (IPv4)
[2025-06-23 01:22:39.016] Extension host agent listening on 42027
[2025-06-23 01:22:39.016]
[2025-06-23 01:22:39.016] [04:22:38]
[2025-06-23 01:22:39.016]
[2025-06-23 01:22:39.016]
[2025-06-23 01:22:39.016]
[2025-06-23 01:22:39.016]
[2025-06-23 01:22:39.016] [04:22:38] Extension host agent started.
[2025-06-23 01:22:39.028] Started local proxy server on 50427.
[2025-06-23 01:22:39.028] WSL resolver response: 127.0.0.1:50427
[2025-06-23 01:22:39.028] To debug connection issues, open a local browser on 127.0.0.1:50427/version
[2025-06-23 01:22:39.038] NodeExecServer run: C:\WINDOWS\System32\wsl.exe -d Ubuntu -e /home/trevor/.vscode-server/bin/18e3a1ec544e6907be1e944a94c496e302073435/node -e const net = require('net'); process.stdin.pause(); const client = net.createConnection({ host: '127.0.0.1', port: 42027 }, () => { client.pipe(process.stdout); process.stdin.pipe(client); }); client.on('close', function (hadError) { console.error(hadError ? 'Remote close with error' : 'Remote close'); process.exit(hadError ? 1 : 0); }); client.on('error', function (err) { process.stderr.write(err && (err.stack || err.message) || String(err)); });
[2025-06-23 01:22:39.114] NodeExecServer run: C:\WINDOWS\System32\wsl.exe -d Ubuntu -e /home/trevor/.vscode-server/bin/18e3a1ec544e6907be1e944a94c496e302073435/node -e const net = require('net'); process.stdin.pause(); const client = net.createConnection({ host: '127.0.0.1', port: 42027 }, () => { client.pipe(process.stdout); process.stdin.pipe(client); }); client.on('close', function (hadError) { console.error(hadError ? 'Remote close with error' : 'Remote close'); process.exit(hadError ? 1 : 0); }); client.on('error', function (err) { process.stderr.write(err && (err.stack || err.message) || String(err)); });

По логам, если верить нейросети, всё в порядке и подключение есть, однако WSL: Ubuntu в левом нижнем углу продолжает гореть синим.
Комп, всл, VSCode перезапускал, расширения переустанавливал, но ничего не помогло. С сетью проблем нет, ВПН не использовал.
Помогите, пожалуйста, разобраться, почему VSCode не хочет подключаться к ВСЛ?
  • Вопрос задан
  • 20 просмотров
Подписаться 1 Простой Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы