Debugging Spooler Components

Important

The modern print platform is Windows' preferred means of communicating with printers. We recommend that you use Microsoft's IPP inbox class driver, along with Print Support Apps (PSA), to customize the print experience in Windows 10 and 11 for printer device development.

For more information, see Modern print platform and the Print support app design guide.

This section provides information about how you can enable debug messages in spooler components. The first part of this section lists the debug variables used in spooler components. You can use these debug variables to cause debug messages originating in spooler components to be displayed. Note that you must be working with checked builds of these components.

Checked builds were available on older versions of Windows, before Windows 10 version 1803. Use tools such as Driver Verifier and GFlags to check driver code in later versions of Windows.

The second part of this section details the steps need to display trace messages in a spooler component.

There are special considerations for debugging XPSDrv printer drivers.

Displaying Trace Messages in a Spooler Component

The following procedure lists the steps necessary for you to be able to see trace messages in checked builds of winspool.drv. The steps for displaying trace messages are similar for other spooler components.

To display trace messages in a spooler component:

  1. Attach a debugger.

  2. Break into the process you want to debug.

  3. Find the debug variable, winspool!ClientDebug.

  4. Set the DBG_TRACE bit (0x0008) in the low WORD of the winspool!ClientDebug variable.

  5. Click Go.