Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Driver Kit
Design Guide
 Enabling a Debugger
Windows Driver Kit: User-Mode Driver Framework
Enabling a Debugger

If a debugger is enabled, the computer can detect the debugger after the driver manager starts the driver host process for the device and the request to attach the debugger is made. To enable the debugger, you should set the HostProcessDbgBreakOnStart entry, which is located under the following key in the registry, to a nonzero value.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WUDF\Services\{193a1820-d9ac-4997-8c55-be817523f6aa}

Note  The computer is preconfigured with HostProcessDbgBreakOnStart set to 0. That is, the computer is preconfigured so that it will not detect any debugger.

Setting HostProcessDbgBreakOnStart configures an initial breakpoint (IB) time-out, in seconds. By default, the IB time-out is configured to detect the user-mode debugger. However, the computer can detect both user-mode and kernel-mode debuggers by setting the high bit (0x80000000) in the HostProcessDbgBreakOnStart value.

The UMDF searches for the user-mode debugger once a second until the IB time-out elapses. If a user-mode debugger is not detected and attached within the IB time-out value and the high bit in HostProcessDbgBreakOnStart is set, the UMDF attempts to break into the kernel-mode debugger.

Enabling the IB time-out disables other UMDF time-outs (for example, Plug and Play [PnP]operations). For more information about UMDF time-outs, see How UMDF Enforces Time-Outs.

The following examples describe scenarios of enabling a debugger:

  • HostProcessDbgBreakOnStart set to 0x00000004

    The UMDF attempts to connect to the user-mode debugger once a second for 4 seconds. The UMDF never tries to connect to the kernel-mode debugger.

  • HostProcessDbgBreakOnStart set to 0x80000000

    The UMDF waits 0 seconds and then attempts to connect to the user-mode debugger. If the user-mode debugger is not attached within 0 seconds (that is, the UMDF makes only one attachment attempt), the UMDF tries to connect to the kernel-mode debugger.

  • HostProcessDbgBreakOnStart set to 0x80000004

    The UMDF attempts to connect to the user-mode debugger once a second for 4 seconds. If the user-mode debugger is not attached within 4 seconds, the UMDF tries to connect to the kernel-mode debugger.


Send feedback on this topic
Built on November 19, 2009
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker