Registry Values for Debugging WDF Drivers (KMDF and UMDF)
This topic describes the registry values that a Windows Driver Frameworks (WDF) driver can set. It applies to Kernel-Mode Driver Framework (KMDF) drivers and User-Mode Driver Framework (UMDF) drivers starting with UMDF version 2.
The following registry values can exist under a driver's Parameters\Wdf subkey. For a KMDF driver, this subkey is located in HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services, under the driver's service name. For a UMDF driver, this subkey is located in HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WUDF\Services, under the driver's service name. The subkey for the driver always uses the driver's service name, even if the driver binary's file name differs from the service name.
- VerifierOn (REG_DWORD)
Set to a nonzero value to enable KMDF Verifier, which extensively validates a driver's state and function parameters. You should set VerifierOn and DbgBreakOnError when you are developing your driver.
- VerifyOn (REG_DWORD)
Set to a nonzero value to enable the WDFVERIFY macro that is defined in Wdfassert.h, or set to zero to disable the macro. If the VerifyOn value is set, VerifyOn is implicitly set to nonzero.
- DbgBreakOnError (REG_DWORD)
If set to a nonzero value, the framework breaks into the debugger when a driver calls WdfVerifierDbgBreakPoint. (If the VerifierOn value is set, the framework breaks into the debugger even if the DbgBreakOnError value does not exist.)
- DbgWaitForSignalTimeoutInSec (REG_DWORD)
Starting in Windows 8, when VerifierOn and DbgBreakOnError are set to nonzero values, the driver can change the default timeout period for breaking into the debugger by setting DbgWaitForSignalTimeoutInSec.
This value is available in framework versions 1.11 and later.
- VerifierAllocateFailCount (REG_DWORD)
If set to a value n, and if VerifierOn is set, the framework fails every attempt to allocate memory for the driver's objects after the nth allocation. This failure helps you test your driver's handling of low-memory conditions. For example, if you set VerifierAllocateFailCount to 2, every memory allocation after the second allocation will fail. The default value for VerifierAllocateFailCount is 0xffffffff. After setting VerifierAllocateFailCount, you can turn it off by setting it to (DWORD) -1 or removing the value altogether.
Note that the verifier counts both the allocations that your driver requests and the allocations that the framework requests on behalf of your driver. Also note that the number of allocations that might occur for your driver can change from one release of the framework to the next.
- TrackHandles (REG_MULTI_SZ)
If set to a list of one or more type names of framework object handles, and if VerifierOn is set, the framework tracks references to all object handles that match the specified handle types. For example, if the handle type list consists of the "WDFREQUEST WDFQUEUE" string, the framework tracks references to all request objects and queue objects. If the list contains an asterisk ("*"), the framework tracks all object handles.
- VerboseOn (REG_DWORD)
If set to a nonzero value, the framework's event logger records additional information that can help you debug your driver, such as entries into or exits from internal code paths. You should set this value only while you are developing your driver.
- LogPages (REG_DWORD)
Set to the number of memory pages that the framework assigns to its event logger. If the value is undefined, the framework uses a default value of one page. The maximum value that you can set is 16 for computers that have 4-kilobyte-sized memory pages (x86 and amd64 processors) and 8 for computers that have 8-kilobyte-sized memory pages (ia64 processors). (The operating system might not write the log contents to a crash dump file if a large number of pages is specified.)
- ForceLogsInMiniDump (REG_DWORD)
Set to a nonzero value to cause the framework to include information from its event logger in crash dump files.
- TraceDelayTime (REG_DWORD)
For Microsoft Windows 2000 only, set to a nonzero value to introduce a delay during initialization of WPP software tracing. The value is specified in milliseconds and a useful value is 1000 (1 second). Without this delay, the first part of the WPP trace might be missed.
- EnhancedVerifierOptions (REG_DWORD)
This value contains a bitmap. Each bit represents an additional verifier option that users can enable by setting the bit.
0x1: If set, the verifier checks whether each of the driver's event callback functions does the following:
Returns at the same IRQL at which it was called. If the values are different, a WDF_VIOLATION bug check occurs with an error code of 0xE.
0x10000: If set, and if the driver has enabled guaranteed forward progress for an I/O queue, the framework simulates a low-memory situation for each of the queue's I/O requests.
0x20000: If set, and if the driver has enabled guaranteed forward progress for an I/O queue, the framework simulates a low-memory situation for some randomly selected I/O requests.
This value is available in framework versions 1.9 and later.
- VerifyDownLevel (REG_DWORD)
If set to a nonzero value, and if the driver was built with a version of the framework that is older than the current version, the framework's verifier includes tests that were added after the driver was built. If this value does not exist or is set to zero, the framework's verifier includes only the tests that existed when the driver was built.
For example, if your driver was built with version 1.7 of the framework, and if version 1.9 of the framework is installed on the computer, setting VerifyDownLevel to nonzero causes the verifier to include tests that were added to version 1.9 of the verifier when your driver runs.
This value is available in framework versions 1.9 and later.
For a KMDF driver, the following registry value can exist under the HKLM\SYSTEM\CurrentControlSet\Control\Wdf\Kmdf\Diagnostics registry key. For a UMDF driver, the following registry value can exist under the HKLM\System\CurrentControlSet\Control\Wdf\Umdf\Diagnostics registry key. The driver might need to create the optional Diagnostics subkey.
- DbgPrintOn (REG_DWORD)
If set to a nonzero value, the framework's loader sends a variety of messages to the kernel debugger while it is loading a driver and binding it to a version of the framework library, or while it is unloading a driver.
If a value is not defined in the registry, the framework uses a default value of zero.
Build date: 11/16/2013