Visualt studio code debug with wsl ubuntu


安装内容

参照地址:https://ubuntu.com/tutorials/install-ubuntu-on-wsl2-on-windows-10#3-download-ubuntu

  1. 开启系统特性
  • Linux 用windows sub system
  • Windows virtual platform
  1. 安装Windows Terminal preview
    微软商店或者安装包安装 https://github.com/microsoft/terminal

  2. 安装wsl与ubuntu
    管理员权限启动windows terminal,执行命令
    wsl --install -d ubuntu

  3. 设置ubuntu用户和密码

  4. 启动ubuntu的visual studio code
    在ubuntu的文件夹执行以下命令
    code .

  5. windows terminal preview设置ubuntu