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

3.1k views Asked by At

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.

2

There are 2 answers

1
frp On BEST ANSWER

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

0
Piotr Bocian On

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.