How to View Trace Messages with WinDbg

You can configure WinDbg to receive and display trace messages from a WDF driver. This allows you to view the messages in the WinDbg Command window in real time, while you are debugging the driver. This example shows how to redirect Osrusbfx2 trace messages to the WinDbg kernel debugger.

Chapter 11 provides information about WPP tracing, TraceView, and related tools and procedures.

To configure WinDbg to display trace messages

  1. Use the .load command to load Wmitrace.dll and Traceprt.dll.

    These files contain tracing-related debugger extensions. They are located in the Program Files\Debugging Tools for Windows\Winxp folder.

  2. Copy the driver’s TMF files to a convenient folder on the host computer.

  3. Use the !wmitrace.searchpath ...

Get Developing Drivers with the Windows® Driver Foundation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.