Visual Studio Graphics Debugger
The Visual Studio Graphics Debugger (vs Graphical development debugging tool) supports dynamic debugging of shaders in Vs2013ide. If you are familiar with previous versions of DirectX, you may have used the Graphics debugging tool pix. The Visual Studio Graphics Debugger has replaced the PIX but the basic workflow remains consistent.
Warning:
The VS2013 Express version does not support visual Studio Graphics Debugger. To use this debugging tool, you need to purchase a billing version. But don't worry, you can do all the work in this book without the help of VS Graphics debugger.
Select Debug-->graphics-->start diagnostices from the VS main Menu, or press Alt+f5 to start the debugger. The application is also started and a tab named Graphics Experiment.vsglog is added to the VS formula bar. Press the PRINT SCREEN key to intercept diagnostic information for a single frame from a running program. The captured picture is added to the log tag's reconnaissance list, allowing different picture frames to be intercepted at several different breakpoints in the application.
Debugging shaders is completely different from debugging traditional procedures. Recall that shader executes a single vertices and pixels. So you need to specify the pixel you want to debug (and also specify the corresponding primitive). Move the mouse over the captured picture frame to select a pixel, at which point the cursor becomes a magnified Red Cross (as shown in Figure 3.8). When a Pixel is selected using a cross cursor, the corresponding record is displayed in the graphics Pixel History panel. If you do not see the History panel, select Debug-->graphics-->pixel History on the main menu of VS.
Figure 3.8 The Visual Studio Graphics Debugger log with a pixel selected from a captured frame. (Texture