Unable to create shader debug session

"Source is unavailble"

I want to test Metal shader debugger. I downloaded this sample code from Apple: https://developer.apple.com/documentation/metal/compute_passes/processing_a_texture_in_a_compute_function?language=objc

In the project build settings, "Metal compiler - Build Options" -> "Produce Debugging Information", I set the value to "Yes, include source code".

Then run and take a capture. In the Metal debugger, when I hit the debug button on the draw call, i get an error "Source is unavailable". Clicking the "import source" button in the dialog doesn't solve the issue.

What am i doing wrong?

My workstation: Mac mini M1 2020, Mac OS Ventura 13.1, XCode 14.1 (14B47b)

Answered by OctoBHVR in 743045022

Found the issue: the "macOS Deployment Target" in the sample project was incorrect. While trying with a different sample I got this error message:

[Metal Diagnostics Warning] Application Deployment Target Version (10.12) does not match OS Version (13.1) - diagnostics may be missing debug information

Changing the target version to 13 fixed the shader debugger.

When I say the "debug button" I mean this one.

Accepted Answer

Found the issue: the "macOS Deployment Target" in the sample project was incorrect. While trying with a different sample I got this error message:

[Metal Diagnostics Warning] Application Deployment Target Version (10.12) does not match OS Version (13.1) - diagnostics may be missing debug information

Changing the target version to 13 fixed the shader debugger.

hey dude I have the same problem what ‘s the final way you deal?

Unable to create shader debug session
 
 
Q