Sign in to follow this  
mancubit

Debugging DirectX in Visual Studio

Recommended Posts

I wonder if there are any good tutorials out there, how you can effectively debug directx applications in Visual Studio. At the moment everytime i get some error, i just crawl through the code and hope finding the mistake. I am quite familiar with classic debugging, as are "stop","step","jump over" and so on, but with directx, i dont know how i can do it.. anyone knows a decent tutorial on this? edit: shader-debbuging would be nice too, but i guess fx-composer + debugging plugin will do the job quite well (when i finally free up some time to study it)

Share this post


Link to post
Share on other sites
You can off course debug DirectX application in Visual Studio, like any other application. If you want more information in debug output go start->run->dxcpl
and in Direct3D9 tab set output level to max. You will see what went wrong.
There are also several option like debug on Multi Monitor, where you can debug full screen application if you have two (or more) monitors.

One more important thing is "break on AllocId" function, where after exiting debugger, you will see eventually which objects are not properly released. Just enter the id number of non-properly released object in "break on AllocId", and next time you start the debugger, debugger will stop on that line of code where the object is allocated, so you will know what you didn't released properly.

hope this helps

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this