如何在 Visual Studio 2013 中使用带/不带Microsoft应用程序验证程序的调试
How to use Debug with/without Microsoft Application Verifier in Visual Studio 2013
所以我安装了应用程序验证器来帮助我进行调试,但是我不知道如何正确使用它。
首先,它似乎已经永久地依附于Visual Studio。每当我通过 Visual Studio 在调试模式下运行任何应用程序时,验证程序都会自动介入。这是一个问题,因为它会大大减慢执行速度,但似乎没有办法在没有验证器的情况下运行调试器了?我真的不想每次想使用它时都重新安装它,然后再次卸载它。
其次,它似乎确实可以有效地发现泄漏等,但我不确定如何处理输出消息:
=======================================
VERIFIER STOP 00000900: pid 0x43C: A heap allocation was leaked.
12626FE8 : Address of the leaked allocation. Run !heap -p -a <address> to get additional information about the allocation.
04E2BA6C : Address to the allocation stack trace. Run dps <address> to view the allocation stack.
11E0AFE0 : Address of the owner dll name. Run du <address> to read the dll name.
6C660000 : Base of the owner dll. Run .reload <dll_name> = <address> to reload the owner dll. Use 'lm' to get more information about the loaded and unloaded modules.
=======================================
在哪里可以运行列出的命令?没有单独的控制台,直接启动验证程序会启动 GUI,但您也不能在其中输入任何命令。
我正在使用Windows 8.1和Visual Studio ultimate 2013。该项目是一个C++项目。
//编辑:
关于第一个问题:我只需要从 GUI 的列表中删除可执行文件,我认为如果程序没有运行,这不会有任何影响。
您可以在WinDBG中运行这些命令,您可以在此处获得这些命令
使用WDK(本质上是WinDBG(的调试器进行调试时,还可以在Visual Studio的即时窗口中运行这些命令。
回答如何在Visual Studio中附加应用验证程序的附带问题:
- 运行应用程序验证程序 GUI
- 选择要调试的二进制文件(exe/dll(
- 选择要检查的选项
- 单击[保存] - 它会自动跟踪,直到您明确删除应用程序。这些设置即使在系统重新启动时也能继续存在。
相关文章:
- 使用不带参数的函数访问结构元素
- 不带大括号的枚举形式
- 将静态库链接到不带-fPIC的共享库中
- 检查不带转换的扫描格式
- 从具有默认值的部分指定模板类继承时发生SWIG错误,具有不带默认值的正向声明
- 不带预处理器的调用方法/文件的文件名/行号
- 如何打印不带空格的输入整数?
- 带<T>或不带 (C++) 的类模板
- 声明C++数组(带或不带 "new" 关键字)
- 不带轮询的 SDL2 事件回调
- 多个'if'语句,不带'else'
- 使用不带缓冲区变量的冲刺
- "extern"声明以及带有和不带参数列表的类模板实例的后续定义
- 打印标准::<char>不带无关字符的矢量
- f 是指向函数的指针,该函数采用 int,并返回指向不带任何内容并返回双精度的函数的指针
- 调用多个类而不带 if 语句
- 在 c++ 中,rand() 在执行有调试和不带调试的程序时生成不同的结果
- 删除动态数组上不带方括号的内容
- 定义不带大小或零大小的数组
- 如何在 Visual Studio 2013 中使用带/不带Microsoft应用程序验证程序的调试