rust debug之基于pdb
方法一:
用visual studio
步骤:
安装msvc工具链 rustup toolchain install stable-x86_64-pc-windows-msvc
切换到该工具链 rustup default stable-x86_64-pc-windows-msvc
编译代码 F:\rust_test\t1>cargo build
Compiling t1 v0.1.0 (F:\rust_test\t1)
Finished dev [unoptimized + debuginfo] target(s) in 1.71s
调试F:\rust_test\t1>"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe" F:\rust_test\t1\target\debug\t1.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:\Users\cutep\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust g:\rustc\fc50f328b0353b285421b8ff5d4100966387a997
rust debug之基于pdb的更多相关文章
- pytorch Debug —交互式调试工具Pdb (ipdb是增强版的pdb)-1-在pytorch中使用
参考深度学习框架pytorch:入门和实践一书第六章 以深度学习框架PyTorch一书的学习-第六章-实战指南为前提 在pytorch中Debug pytorch作为一个动态图框架,与ipdb结合能为 ...
- pytorch Debug —交互式调试工具Pdb (ipdb是增强版的pdb)-1-使用说明
初学时大多使用print或log调试程序,这在小规模的程序下很方便 但是更好的方法是一边运行一边检查里面的变量和方法 1.Pdb Pdb是一个交互式的调试工具,集成于Python标准库中 Pdb能让你 ...
- [WASM + Rust] Debug a WebAssembly Module Written in Rust using console.log
Having some kind of debugging tool in our belt is extremely useful before writing a lot of code. In ...
- 基于 apache-arrow 的 duckdb rust 客户端
背景 duckdb 是一个 C++ 编写的单机版嵌入式分析型数据库.它刚开源的时候是对标 SQLite 的列存数据库,并提供与 SQLite 一样的易用性,编译成一个头文件和一个 cpp 文件就可以在 ...
- Rust如何开发eBPF应用(一)?
前言 eBPF是一项革命性的技术,可以在Linux内核中运行沙盒程序,而无需重新编译内核或加载内核模块.它能够在许多内核 hook 点安全地执行字节码,主要应用在云原生网络.安全.跟踪监控等方面. e ...
- 【Tip】如何让引用的dll随附的xml注释文档、pdb调试库等文件不出现在项目输出目录中
项目输出目录(bin/debug|release)中经常是这个样子: main.exemain.pdb a.dll a.xml b.dll b.pdb b.xml ... 其中xml是同名dll的注释 ...
- .Net中的Debug模式和Release模式
1.Debug模式和Release模式 在vs中,运行程序有两种模式:Debug和Release 在bin目录下也会生成对应的文件夹,用于存放生成的dll等文件,这两种模式的区别如下: Debug:用 ...
- .NET中Debug模式与Release模式
Visual Studio 项目对程序的发布和调试版本分别有单独的配置.顾名思义,生成调试版本的目的是用于调试,而生成发布版本的目的是用于版本的最终分发. 如果在 Visual Studio 中创建程 ...
- [转]C# 中的.pdb/ .vshost.exe/ .vshost.exe.manifest文件讨论
原文出处:http://blog.163.com/chwei_sunshine/blog/static/19412628320125893656652/ pdb文件: 英文全称:Program Dat ...
随机推荐
- 【SoftwareTesting】Homework2
For the Program1, For Question1: The fault is that in the loop condition, ' i ' should be not less t ...
- jQuery 核心函数
$() ;/ jQuery () ; 就代表调用 jQuery 的核心函数. 1. 接收一个函数. $(function(){ alret('hello world'); }); 2. 接收一个字 ...
- Spine用于Timeline(NullReferenceException: Object reference not set to an instance of an object pine.Unity.Editor.AnimationReferenceAssetEditor.OnInspectorGUI ())
报错信息:Spine.Unity.Editor.AnimationReferenceAssetEditor.OnInspectorGUI () (at Assets/Extention/Spine/E ...
- IP通信基础课堂笔记----第二章(重点)
TCP报文及传输 TCP报文主要学习的内容包括,报文格式.连接管理.流量控制.差错控制. TCP报文是由报文头部和数据两个部分组成.占20字节的报文头部包括源端口.位目的端口.序号..确认号.首部长度 ...
- Aforge.net识别简易数字验证码问题
参考:https://www.bbsmax.com/A/rV57LjWGdP/ https://blog.csdn.net/louislong007/article/details/47683035 ...
- myls
#include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <unist ...
- C++实验:时间和日期类
描述 用C++实现日期类CDate和时间类CTime,并在次基础上利用多继承实现日期时间类CDateTime,使其能输出样例信息. 主函数里的代码已经给出,请补充完整,提交时请勿包含已经给出的代码. ...
- Openflow协议详解
http://www.h3c.com/cn/d_201811/1131080_30005_0.htm# 1 OpenFlow背景 转发和控制分离是SDN网络的本质特点之一 .在SDN网络架构中,控制平 ...
- 练习UML类图中的类的表示
第一部分:UML类图(class diagram) 类图用来展现一组类.类的特性以及其类相互之间的关系,一个类图由一组类以及它们之间的关系构成,类图用来对系统的领域概念以及静态结构进行建模. 在软件模 ...
- KUANGBIN带你飞
KUANGBIN带你飞 全专题整理 https://www.cnblogs.com/slzk/articles/7402292.html 专题一 简单搜索 POJ 1321 棋盘问题 //201 ...