Attaching a User-Mode Debugger
After the driver manager starts the driver host process for the device, you can attach a user-mode debugger. How you attach the debugger depends on how many devices are attached to the computer:
If a single device is attached, run the following command:
windbg -pn WUDFHost.exe
Run this command repeatedly until a host process to debug is discovered.
If multiple devices are attached, determine the process identifier (PID) of a particular host and run the following command:
windbg -p PID
You can use the operating system-supplied Tasklist.exe to determine the PID of a host process. (Tasklist.exe is a command-line application that provides a user with a list of processes that are running on the operating system.)