zoukankan      html  css  js  c++  java
  • rust debug之基于pdb

    方法一:

    用visual studio

    步骤:

    安装msvc工具链 rustup toolchain install stable-x86_64-pc-windows-msvc

    切换到该工具链 rustup default stable-x86_64-pc-windows-msvc

    编译代码 F: ust_test 1>cargo build
       Compiling t1 v0.1.0 (F: ust_test 1)
        Finished dev [unoptimized + debuginfo] target(s) in 1.71s

    调试F: ust_test 1>"C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDEdevenv.exe" F: ust_test 1 argetdebug 1.exe

    然后你就可以下断电了

    方法二:用vscode

    参考链接 https://www.brycevandyk.com/debug-rust-on-windows-with-visual-studio-code-and-the-msvc-debugger/

    步骤

    安装拓展 

    • C/C++: Brings in support for debugging MSVC applications. Since we're using MSVC behind the scenes, this gives us some debugging support for our Rust programs.
    • Native Debug: Allows us to set breakpoints by clicking next to line numbers.

    配置

     

    遗留问题

    在debug的时候vscode总是找不到代码

    但是goto definition是对的

     暂时解决方案: xcopy /c/d/e C:Userscutep.rustup oolchainsstable-x86_64-pc-windows-msvclib ustlibsrc ust g: ustcfc50f328b0353b285421b8ff5d4100966387a997

  • 相关阅读:
    19-10-31-B
    19-10-30-Night-V
    19-10-30-C
    19-10-29-Night-X
    19-10-29-Z
    19-10-28-A
    19-10-27-S
    19-10-26-Night-D
    留言板
    优秀博客存档
  • 原文地址:https://www.cnblogs.com/cutepig/p/10778295.html
Copyright © 2011-2022 走看看