In Unreal 5.5 and earlier, I was able to debug shader source code in the editor using the RenderDoc plugin. Unfortunately, it seems like in 5.6, this is no longer working.
I attached two pictures of what it looks like debugging a pixel shader inside Renderdoc in 5.5 and 5.6. Debugging HLSL code is much more useful, so it would be appreciated getting this working again. My guess is that something moved in the engine that the plugin didn’t get updated to account for.
This should happen on any project in 5.6, so I did not upload any projects to help with a repro.
I’ve been investigating your case and just wanted to give you a quick update, since it’s a long weekend starting tomorrow for us and I won’t be able to get back to this issue until Monday (NZT).
I’ve found the change that introduced the issue here:
One of the things this change does is strip out the embedded pdb (debugging info), and place it in a seperate pdb file. However, for some reason RenderDoc isn’t able to pick up the association between the shader and this external pdb file. From a brief test it appears PIX may also be affected by this issue. I will be investigating further on Monday.
For now, if you are using an engine source build, you can add the following line to D3DShaderCompilerDXC.cpp to work around the issue:
I wrote up a blurb that was supposed to be included in the release notes about this but somehow it got omitted, apologies; I will follow up with our release team on what happened here.
The gist is that PC symbols are now exported to external PDB files rather than embedded in the bytecode. As a result note an explicit symbol search path needs to be configured in any graphics debugging tools which require shader symbols (i.e. both PIX and RenderDoc). By default symbols are exported to the <project>/Saved/ShaderSymbols folder, but this is configurable.
Note that these changes exposed some bugs in both of these tools; it’s recommended to update to PIX 2505.09 and/or RenderDoc v1.38 to avoid these problems.
Note, for RenderDoc the setting is under Settings -> Core -> Shader debug search paths; I’ve also found that for some reason captures need to be reloaded after configuring the path (the “Tools -> Resolve Symbols” command doesn’t appear to do anything).
For PIX it’s under File -> Settings -> Symbol/PDB Options.
Thanks for the great replies. Manually pointing to the shader symbols worked for me and I was able to debug shaders again. I don’t think there’s anything more we need to discuss.
FYI, I’ve followed up with our docs team and the release notes have been updated to include the missing information (there were a number of other missing entries as well).