rust环境配置

安装cargo

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

 

vscode插件, gdb打印的参数不全,会丢失变量,用lldb

ext install rust-lang.rust
ext install vadimcn.vscode-lldb

 

调试配置

tasks.json

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "build",
      "type": "shell",
      "command": "cargo build"
    }
  ]
}

 

launsh.json

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "rust_debug",
      "type": "lldb",
      "request": "launch",
      "program": "${workspaceRoot}/target/debug/${workspaceRootFolderName}",
      "cwd": "${workspaceRoot}",
      "preLaunchTask": "build"
    }
  ]
}

 

posted @ 2021-04-28 21:29  自由出土文物  阅读(83)  评论(0编辑  收藏  举报