# Can't get debug spew for Direct3D9

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?

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

## 2 Answers

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.

## Edit

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

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

You can also view it using a tool like DebugView

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)

• No, it's a 32bit application. I also set both 32 and 64bit to debug mode. – DeadMG Feb 26 '12 at 21:10
• 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. – Pablo Ariel Feb 27 '12 at 2:50