• VScode 配置rust开发环境


    记录一下在Visual Studio Code中配置Rust debug模式。

    Rust 版本

    安装Rust,具体到官网下载 https://www.rust-lang.org/,
    由于我在windows环境上,因此安装了msvc版本

    Default host: x86_64-pc-windows-msvc
    rustup home:  D:Usersxxx.rustup
    
    stable-x86_64-pc-windows-msvc (default)
    rustc 1.46.0 (04488afe3 2020-08-24)
    
    cargo 1.46.0 (149022b1d 2020-07-17)
    

    用Cargo运行如下命令新建工程

    PS D:vstestmain> cargo new RustDemo
         Created binary (application) `RustDemo` package
    

    VSCode配置

    ​ 安装三个插件

    1. Rust for Visual Studio Code

    2. rust-analyzer

    3. Native Debug

      修改launch.json

    /* launch.json */
    {
        // Use IntelliSense to learn about possible attributes.
        // Hover to view descriptions of existing attributes.
        // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
        "version": "0.2.0",
        "configurations": [
            {
                "name":"(Windows) Launch"
                "type":"cppvsdbg",
                "request": "launch",
                "program": "${workspaceFolder}/target/debug/RustDemo.exe",
                "args": [],
                "cwd": "${workspaceFolder}"
            }
        ]
    }
    
  • 相关阅读:
    A Famous City
    A Famous ICPC Team
    配置单元测试环境,找不到SenTestingKit
    linux解压.tar命令
    语音输入——科大讯飞
    查看dsym错误信息
    工程里关闭arc
    导入签名错误
    mac显示隐藏文件
    类uialertview弹出动画
  • 原文地址:https://www.cnblogs.com/langzou/p/13673601.html
Copyright © 2020-2023  润新知