Group Group Group Group Group Group Group Group Group

Debug Shader: Unable to create shader debug session

Even after setting the debug configurations ‘Produce debugging information’ to ‘Yes, include source code’, I still get the’ Unable to create shader debug session’ error. This only happens for the fragment / vertex shaders. The compute pipeline seems to work fine. I’ve tried on multiple computers. I’m on Xcode 10.1. Am I missing something obvious?

@smehsu - since compute works fine, I assume that you are using Mojave?

Your fragment and vertex shaders work correctly? Have you tried it on the simplest fragment and vertex functions?

Your Scheme Settings (Options tab) should look like this:

(Make sure that it says Debug under Run)

In your project build settings, make sure that Release build Configuration has No

Other than those, I am out of ideas.

Btw - I notice Apple has written a shiny new article on “Resolving Shader Issues with the Shader Debugger”. They don’t have any further suggestions either:

https://developer.apple.com/documentation/metal/tools_profiling_and_debugging/resolving_shader_issues_with_the_shader_debugger

Thanks Caroline!

Unfortunately it appears my project is setup correctly. However, oddly enough, when I run on an iOS device the debug shader session works fine!

@smehsu what GPU are you using on macOS? also, is this happening with shaders from our book or your own shaders?

Hi,
I’ve same issue after following formation for make quad :).
Then I’ve just find it after loose 2 hour install/remove xcode.

I’ve just find that : even if you removed old beta xcode and reinstall new one (not beta) you have to set this : Xcode Preferences -> Locations -> Command Line Tools: Xcode 11.1 (not let auto or beta 11.2)

not about your macbook model : mine is 2019 with 2 GPU (intel + vega 20).

1 Like

@levanlong - thank you for your feedback. Good suggestion!