I managed to capture a frame now.
To make it run, I had to enter a path in Debugging->Working Directory too.
As usual, shader source code is not available to debug right off the bat.
I tried compiling the effects file .fx in Debug mode with the pipeline tool. Still, it says “Source not available” when I try to debug the pixel shader.
The guide says to include the line #pragma enable_d3d11_debug_symbols
directly in the shader - is this relevant for MonoGame too?
That should work, because MG passes the shader to the D3D compiler after removing the Effects framework stuff (like sampler state in the shader, techniques and semantics).
If I build the game in Release mode and try to debug it using the Graphics Debugger, will that strip debug information from the shaders?
I can’t seem to run the Debug version of the game in the Graphics Debugger right now without it crashing…
If you build your shaders using the Pipeline Tool, there is a property that says if they should be built with the Debug flag. It is set to “Auto” by default, but you can force the Debug flag by changing it to “Debug”.
I can confirm that this is the important step - I didn’t need the #pragma.
I found, however, that a lot of the shaders were still obfuscated. They showed up as lists of includes. This might be particular to our project, which was an old xna project.
I’m now looking into debugging them through nSight, but I suspect I’ll have similar results.