By default, it is installed into the folder, C:\Program Files (x86)\Windows Kits\10\Debuggers\x64
Now, the tool has been installed, we need to turn on heap checking on the application that we want to debug.
Open a command window (cmd.exe) as admin and change directory to the Windbg installation directory.
Run this command (replace the .exe name with the one you need to debug) the command below:
gflags /p /enable <executable.exe> /full
(replace <executable.exe> with the name of the application to debug , e.g
gflags /p /enable DasClientAgent.exe /full
Restart the service, e.g. DasClientAgent
net stop DasClientAgent
net start DasClientAgent
Find the PID of DasClientAgent using the Task Manager, e.g. 4320,
and Next, we need to enable crash dump on the application that we want to debug.
First, create a folder for saving dump files, for instance: c:\dumps,
Now, enable crash capture,There are 2 option to enable crash dump on the application, using the PID of the application or the Image Name of the application.
We can find the PID and Image Name of an application from the Task Manager:
Use the command below to enable crash dump with PID:
adplus -crash -p <pid> -o c:\dumps
(Replace <pid> with the PID of the
applicaiton found in the
task manager, e.g. 4320)
As you can imagine, Please note that, if the process id PID changes, for instance, due to machine reboot, then you need to reset it with new id.This particular image name "DasClientAgent.exe" will only appear once in process list on a machine, so you can use the following command instead,will have to re-enable crash dump with the new PID.
Use the command below to enable crash dump with Image Name:
adplus -crash -pn DasClientAgent.exe <image name> -o c:\dumps
(Replace <image name> with the image name of the application found in the task manager, e.g. DasClientAgent.exe)
Finally, we wait for the crash to happen.
After the crash has happened, disable crash capturedump,
gflags.exe -p /disable DasClientAgent.exe