如何在 Visual Studio 2013 中使用带/不带 Microsoft 应用程序验证器的调试

2023-12-29

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

首先,它似乎已经永久地依附于视觉工作室。每当我通过 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++ 项目。

// EDIT:

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


您可以在WinDBG中运行这些命令,您可以得到here http://msdn.microsoft.com/en-us/windows/hardware/hh852365.aspx

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

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何在 Visual Studio 2013 中使用带/不带 Microsoft 应用程序验证器的调试 的相关文章

随机推荐