Graphics Reference
In-Depth Information
Mixed mode debugging for x64 is only supported starting with .NET
Framework 4.
How to do it…
First we will be adding some debug information to our code and then use the Visual Studio
Graphics Debugger to capture a frame. We'll then continue to enable the Direct3D 11 debug
layer and SharpDX object tracking.
Starting the Visual Studio Graphics Debugger:
1. Implement all the steps from the first recipe, Building a Direct3D 11 application
with C# and SharpDX .
2.
Build the project ( F6 ) to be sure everything is working correctly.
3.
Just before the render loop region, we will add the following:
// Setup object debug names
device.DebugName = "The Device";
swapChain.DebugName = "The SwapChain";
backBuffer.DebugName = "The Backbuffer";
renderTargetView.DebugName = "The RenderTargetView";
4.
Let's now run the Visual Studio 2012 graphics debugger by navigating to DEBUG |
Graphics | Start diagnostics ( Alt + F5 ).
If the option is unavailable or does not do anything, be sure to check
that you have enabled native debugging and that the selected .NET
Framework version is 4.0 or later. The project must also be using a
debug configuration not release.
5.
We can ignore the warning that says that there are no native symbols in the
symbol file. This is because we are trying to debug a managed application.
Click on Yes to continue.
6.
If all is well, we should see some statistics in the top left of our application
as shown in the following screenshot:
Graphics debugger text overlay in top left
 
Search WWH ::




Custom Search