Debugging DirectX in Visual Studio
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)
No support for it right now AFAIK, best thing to do is to start familiarizing yourself with PIX and nvidia PerfHUD (or the ATI counterpart).
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement