I’m using the Debug->Graphics->Start Graphics Debugging feature in Visual Studio to kick off the graphics analyzer.
My issue is that when stepping through shader code, a whole lot of variables show up as “Not in scope” when hovered over, and even more importantly perhaps is that large portions of the code are simply skipped over when stepping through code. I’m guessing that maybe there is some optimization going on which changes the flow of code? If so, it would be helpful to turn off during development/debugging if that’s the case.
Workflow/info:
-
I have an empty C++ VS project setup to start the Unity editor when I start graphics debugging.
-
The shaders have the enable_d3d11_debug_symbols define enabled.
-
I capture a frame from within the VS graphics analyzer, then select a pixel to debug.
-
I drill down to the appropriate Pixel/Vert shader and click the green arrow which opens up the associated shader source file and
begin debugging.
Overall, I’m using the technique described here, except I’m simply running the Unity Editor through Visual Studio instead of making a standalone build…this speeds up testing changes as I don’t need to constantly do builds to see changes.
Debugging works as expected aside from many variables not being in scope to inspect, and skipping over (sometimes) significant portions of code, but those are pretty large issues as they keep me from getting insight into how pretty big chunks of the code is working.
Any help would be greatly appreciated.