The Direct3D9 debug runtime's debug output does not appear to be working correctly. I linked against d3dx9d.lib instead of d3dx9.lib and defined D3D_DEBUG_INFO and I also set the debug runtime on in the Direct3D control panel. However, there is still no D3D debug spew in the Visual Studio Output window. Any suggestions as to what I'm missing?

  • \$\begingroup\$ Try also using #pragma comment(lib, "d3dx9d"), etc. \$\endgroup\$ – ChrisC Feb 27 '12 at 1:06

You did everything correctly, however you must run in "Debug" mode - ie press regular F5, not CTRL+F5. Do not choose "start without debugging" from Visual Studio.


I don't actually use #define D3D_DEBUG_INFO, but according to this post you should #define that before including the d3d9 headers.

Also be sure you have set to use the Debug version of D3D9 in the DirectX properties window

this works

The debug information will appear in the Visual Studio Output Window, not in your console window (if you have created one).

this is what it should look like - output window in visual studio

You can also view it using a tool like DebugView

| improve this answer | |

Is it a 64-bit application? I seem to recall there's a separate control panel for x86 and x64 applications in DirectX. It's been a long time since I messed with this stuff but you should be able to see it under the DirectX SDK menu options off the Start Menu, under DirectX utilities (should be one for 32 and 64 bit)

| improve this answer | |
  • \$\begingroup\$ No, it's a 32bit application. I also set both 32 and 64bit to debug mode. \$\endgroup\$ – DeadMG Feb 26 '12 at 21:10
  • \$\begingroup\$ The answer is correct, There is the DirectX Control Panel which comes with the sdk and there you can set to use the d3d debug runtime and the verbosity level. There is also an option for shader debugging and memory check. \$\endgroup\$ – Pablo Ariel Feb 27 '12 at 2:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.