How to use Debug with/without Microsoft Application Verifier in Visual Studio 2013

浪子不回头ぞ 提交于 2020-01-23 11:13:12

问题


So I've installed the application verifier to help me with debugging, however I don't know how to use it properly.

First off, it seems to have attached itself permanently to visual studio. Whenever I run any application in debugging mode through visual studio, the verifier automatically steps in. This is a problem, because it slows down the execution massively, but there doesn't seem to be a way to run the debugger without the verifier anymore? I really don't want to reinstall it every time I want to use it, and then deinstall it again.

Secondly, it does seem to find leaks and such efficiently, but I'm not sure what to do with the output messages:

=======================================
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.


=======================================

Where can I run the listed commands? There's no separate console, and starting the verifier directly starts up a GUI, but you can't enter any commands there either.

I'm using windows 8.1 with visual studio ultimate 2013. The project is a C++ project.

// EDIT:

Regarding the first issue: I just had to remove the executable from the list in the GUI, I didn't think that would have any effects if the program wasn't running.


回答1:


You can run these commands in WinDBG which you can get here

You can also run these commands in Immediate Window of Visual Studio when debugging using debugger from WDK (which is essentially WinDBG).




回答2:


Answering side question how to attach App Verifier in Visual Studio:

  1. Run Application Verifier GUI
  2. Select binary you want to debug (exe/dll)
  3. Select options to check
  4. Click [Save] - it's automatically tracked until you explicitly remove the application. These settings survive even system restart.


来源:https://stackoverflow.com/questions/27214914/how-to-use-debug-with-without-microsoft-application-verifier-in-visual-studio-20

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!