VS Code release 1.86.1 (January 2024) 开始不再支持SSH连接调试 CentOS 7,连接上之后会提示:

you are about to connect to an os version that is unsupported by visual studio code

界面仅能做文本阅读,不能运行代码。

查看issue讨论,主要为两种思路:downgrade VS Code和调整GLIBC路径。

实测downgrade可行,具体步骤如下

  1. 删除VS Code
  2. 官网下载1.85.2版本,重新安装
  3. 断网,打开VS Code
  4. 关闭自动更新
    • Modify settings -> Application -> Update
      Enable Windows Background Updates -> off
      Mode (Configure whether you receive automatic updates) -> none
    • Settings -> Feature -> Extensions
      Auto Check Updates -> Off
      Auto Update -> None
  5. 重启VS Code,登录账号后重新加载Extension。我的 Remote-SSH 自动调整为 version 0.107.1
  6. 再次连接服务器,即可正常使用。
Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐