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.