LoginSignup
20
12

More than 3 years have passed since last update.

VSCodeでRemote-WSLの接続に失敗する

Posted at

はじめに

普段Windows10でVSCodeからWSLに接続して開発しているのですが,
急に以下のログが表示されRemote-WSLに失敗するようになったので解決策を残します

リモート拡張ホスト サーバーへの接続に失敗しました (エラー: WebSocket close with status code 1006)

VSCodeのバージョンを1.53.2に更新してから事象が発生したと記憶してます

環境

以下の環境で事象を確認しました

  • Windows10: 2004
  • WSL: Ubuntu-20.04
  • VSCode: 1.53.2

解決策

私の環境では以下の手順で事象を解決しました

  1. VSCodeの拡張機能Remote-WSLのバージョンを0.53.3以上に上げる
  2. VSCodeの設定からremote.WSL.server.connectThroughLocalhostのパラメータをtrueに変更
  3. Windowsのサービス一覧からLxssManagerを再起動
  4. VSCodeを再起動し,Remote-WSL: New Windowを押下

参考

Failed to connect to the remote extension host server (Error: WebSocket close with status code 1006) #115818

20
12
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
20
12