Static Driver Verifier Diagnostics

SDV has a diagnostics mode that can help you and Microsoft troubleshoot problems that SDV might encounter. When diagnostics mode is enabled, SDV logs messages to a file in your driver's sources directory, tracing SDV activity. The name of the file is StaticDVTrace.log.

Enabling Diagnostics

To enable diagnostics mode, you must edit the Staticdv.exe.config XML configuration file that is located in the SDV bin directory. You can edit the value of the TraceLevelSwitch XML element to set the trace level to one of five values. The default value is 1 - only error messages are logged.

Level Value Description



None (default)



Only error messages



Warning messages and error messages



Informational messages, warning messages, and error messages



Verbose messages, informational messages, warning messages, and error messages

The following procedure describes how to enable diagnostic mode and how to set the level of trace activity to log.

To enable diagnostics

  1. Change to the %DDKPATH%\tools\sdv\bin directory.

  2. Using Notepad or another text editor, open the StaticDV.exe.config file.

  3. Change the value of DataMessagesSwitch to 1.

    <add name="DataMessagesSwitch" value="1" />
  4. Select a value for TraceLevelSwitch from 0 (no trace diagnostics) to 4 (verbose). If you are sending log files to Microsoft for diagnostics, you might be asked to set the TraceLevelSwitch to level 3, which logs informational messages, warning messages, and error messages.

    <add name=" TraceLevelSwitch" value="3" />
  5. Save the StaticDV.exe.config file and run SDV on your driver.

    SDV writes the messages to the StaticDVTrace.log file in your driver's sources directory.

The StaticDV.exe.config file

The following is an example configuration file that enables diagnostics and sets the tracing level to level 3 (Info).

<?xml version="1.0"?>
 <trace autoflush="false" indentsize="4">
<!-- This switch controls data messages. In order to receive data 
         trace messages, change value="0" to value="1" -->
 <add name="DataMessagesSwitch" value="1" />
 <!-- This switch controls general messages. In order to 
         receive general trace messages change the value to the 
         appropriate level. "1" gives error messages, "2" gives errors 
         and warnings, "3" gives more detailed error information, and 
         "4" gives verbose trace information -->
  <add name="TraceLevelSwitch" value="3" />

Send comments about this topic to Microsoft