3

所以我安装了应用程序验证器来帮助我进行调试,但是我不知道如何正确使用它。

首先,它似乎已经永久地依附于视觉工作室。每当我通过 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,但你也不能在那里输入任何命令。

我正在使用带有 Visual Studio Ultimate 2013 的 Windows 8.1。该项目是一个 C++ 项目。

// 编辑:

关于第一个问题:我只需要从 GUI 的列表中删除可执行文件,我认为如果程序没有运行,这不会有任何影响。

4

2 回答 2

4

您可以在 WinDBG 中运行这些命令,您可以在此处获取

当使用来自 WDK 的调试器(本质上是 WinDBG)进行调试时,您还可以在 Visual Studio 的即时窗口中运行这些命令。

于 2014-11-30T15:49:37.787 回答
0

回答有关如何在 Visual Studio 中附加 App Verifier 的问题:

  1. 运行应用程序验证程序 GUI
  2. 选择要调试的二进制文件(exe/dll)
  3. 选择要检查的选项
  4. 单击 [保存] - 它会自动跟踪,直到您明确删除应用程序。即使系统重新启动,这些设置仍然有效。
于 2018-11-13T14:58:18.247 回答