Capturing Graphics Information
You can capture graphics information from your DirectX-based app so that you can use Visual Studio Graphics Diagnostics tools to diagnose rendering problems.
Capturing graphics information is a two-step process. First, run your app under Graphics Diagnostics, and then specify one or more frames to capture detailed information from.
To run your app under Graphics Diagnostics
On the menu bar, choose Debug, Graphics, Start Diagnostics. (Keyboard: Press Alt+F5)
On the Graphics Diagnostics toolbar, choose the Start Diagnostics button.
While an app is running under Graphics Diagnostics, certain kinds of graphics information is captured all the time; this includes device set up, creation of the swap-chain, creation of graphics objects and resources, and other important events that affect more than one frame. At the same time, you can capture detailed information about specific frames; this includes draw calls and compute-shader dispatches, together with the Direct3D objects and resources that support them.
To capture a frame
In Visual Studio, on the Graphics Diagnostics toolbar, choose the Capture Frame button.
From the app, press Print Screen.
Only whole frames can be captured, so when you initiate a capture, it’s really the graphics information from the next frame that's recorded. Recording begins immediately after the frame in which you initiated capture is presented and ends when the captured frame is presented. You can capture as many frames as you want while the app is running under Graphics Diagnostics. If you don't capture any frames, the graphics log is discarded.
When you capture a frame for the first time, Visual Studio displays the graphics log (.vsglog) document window. If you close the graphics log window, stop debugging, or close the app, you can’t capture any more frames to that log. To capture more graphics information, you have to run the app under Graphics Diagnostics again to start a new graphics log.
Graphics information can be captured from an app that's running on the local machine, or on a remote machine or device. Remote capture is supported for Windows 8.1 machines and Windows RT 8.1 devices. To capture graphics information from an app that's running remotely, configure your project for remote debugging and then run your app under Graphics Diagnostics as described earlier. The app runs on the remote machine, and the captured graphics information is recorded on your development machine.
How you configure your project for remote debugging depends on the kind of app you're developing and the programming language you're using. For information about how to configure remote debugging for a Windows Store app, see Debug and test Windows Store apps on a remote machine from Visual Studio. For information about how to configure remote debugging for a Windows desktop app, see Set Up Remote Debugging for a Visual Studio Project.
Later, you can use a remote machine or device to play back graphics information, regardless of where the information was captured from. For more information, see How to: Change the Graphics Diagnostics Playback Machine.