Share via


Where did my debug output go in Vista?

If you are using DbgPrint for your debug output in Vista you may have noticed that you cannot see anything in the debugger.  That is because DbgPrint now defaults to the DEFAULT debug component (you can read about the change here) and the default settings for this component is to hide all output.  To remedy this you can do either of the following

  1. Change the value of Kd_DEFAULT_MASK to 0xFFFFFFFF ('ed nt!Kd_DEFAULT_MASK 0xFFFFFFFF') at runtime or right after boot
  2. Open up the registry and go to this path, HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Debug Print Filter and add the following value "DEFAULT" : REG_DWORD : 0xFFFFFFFF and then reboot

This will allow you to see your debug output, but you might see a lot of other components' output as well.  One way to mitigate this is to use DbgPrintEx instead and pick the component ID which most closely matches your driver's functionality.  Note that DbgPrintEx is only available on Windows XP and later so if you need to support Windows 2000 you might want want to stick with DbgPrint since choosing which function to use at runtime can be difficult (since passing var args can be difficult unless you have variadic parameter support for macros (which the latest WDK has)).

Comments

  • Anonymous
    November 16, 2006
    I think setting Kd_DEFAULT_MASK to "0xF" is  sufficient. I have been using this sucessfully for months now. Do you see any advantage with setting it to value > 0xf?

  • Anonymous
    November 16, 2006
    Probably no advantage, I just have a habit of flipping all the flag bits on debug output b/c I can't remember the differences between some masks and what each bit means.

  • Anonymous
    October 16, 2007
    This is one you can use even if you never use WDF at all (of course, you may find WdfVerifier to be a

  • Anonymous
    October 16, 2007
    This is one you can use even if you never use WDF at all (of course, you may find WdfVerifier to be a

  • Anonymous
    July 15, 2008
    Thanks for the Blog. Very informative. I have one difficulty most of the times I click on a URL in one of these MSDN blogs. It always lead to a "Content not found" page! If someone would resolve this it will be of immense help for us developers. Thanks again Arun