Debugging DirectX without pulling your hair out.

clock November 24, 2007 02:21 by author csmith12

For developing DirectX applications you will encounter an error or two, its just a matter of time. Sometimes (depending on your setup) you will get a error from DirectX that just doesn't help you troubleshoot the issue. There are some trick to making this debugging process a little easier if you know what to do.

Get yourself a tool

Debugview (http://www.microsoft.com/technet/sysinternals/utilities/debugview.mspx) is a tool to capture the debug output from applications. If your settings are in place you can also capture the debug output from DirectX as well.

Environment Setup

Setting up DirectX to output debug information is simple. In the DirectX control panel, you will find a Direct3D tab. On this tab is a slider (Less - More) to toggle the verbose level of debug output for DirectX.  There is also a radio button set to the runtime of Direct3D to be used as well. Most of the issues can be worked out with simply sliding the output level to the max (sliding all the way to More).

Debugging

With debugview and your debug settings in place you can debug in visual studio as you normally would. But, make sure to have debugview running in the background. Run your application to the point of error and pause/stop the visual studio debugger. Switch to the debugview window to see the additional debugging information from the DirectX runtime. Hopefully, between the two sources of debug information you will be pointed in the proper direction to fix your error or issue.

*Note*
Debugview catches any and all debugging information from any running application on your PC. You may be required to set up a filter to filter out unnecessary output. And another cool feature of debugview is it can remotely debug applications installed on other machines. So if you testing your app on another machine, just connect and enjoy the same debugging features you had on your development machine.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Another DirectX Debugging Tip

clock November 24, 2007 02:19 by author csmith12

Here I am again facing a DirectX error. In efforts to diagnose the cause of the error, I ran across a setting for the Visual Studio project that I thought I would share.

The "Enable unmanaged code debugging" checkbox in the project properties of your DirectX application will yield even more debug information to help you isolate issues with working with DirectX.

unmanageddebuggingsetting_thumb1

Remember this setting while debugging your application in the future and best of luck.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


QOTD

Have you ever needed a Captain Crunch Decoder Keyring to figure out code before? I have.....

- Reactor

Calendar

<<  March 2010  >>
MoTuWeThFrSaSu
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234

View posts in large calendar

Sign in