Debug View Hierarchy not showing Metal content

The "Debug View Hierarchy" feature of Xcode is very convenient to break down and debug a complex view hierarchy. But Metal content/layers/views do not render anything in this mode.

Is there some special flag that needs to be set on the layer to support the Xcode feature? Or some special callback that needs to be implemented?

I would naively assume that Xcode could do some kind of read-back from the window server or GPU, even for layers rendered via accelerated APIs like Metal or OpenGL, similar to what's done when recording/capturing the screen.

Filed as FB13509137

Thanks for filing FB13509137.

Hi. While the View Debugger does not render content for Metal views (thanks for filing FB13509137), you can access properties for CAMetalLayer or MTKView views in the Inspector (see screenshot attached)

For more in depth Metal debugging, you can also capture your app using the Metal Debugger.

Debug View Hierarchy not showing Metal content
 
 
Q