Xcode Crash on View Hierarchy debugger for mixed UIKit / SwiftUI app

For a large / older iOS app project, we have noticed the the view hierarchy debugger works fine for our UIKit screens, but runs into the following crasher whenever we try to launch the view hierarchy debugger on a UIHostingVC screen with SwiftUI content:

Unable to capture the view hierarchy "AppName" encountered an unexpected error when processing the request for a view hierarchy snapshot.

--
The operation couldn’t be completed. Log Title: Data source expression execution failure.
Log Details: error evaluating expression “(BOOL)[[(Class)objc_getClass("DebugHierarchyTargetHub") sharedHub] performRequestInPlaceWithRequestInBase64:@"..."]”: error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=2, address=0x16b23bff8).

Has anyone successfully resolved the underlying issue in this crasher? Tried all the typical recommendations for a clean build, clear derived data, use the "Debug -> View Debugging" menu - all with no resolution.

Reported using Feedback Assistant: FB18514200

Thanks

Answered by DTS Engineer in 847272022

Please add some additional information to your bug report explaining what you were trying to do and the situation where this crash occurs. Add a small Xcode project that demonstrates the problem. Include some directions engineering can use together with your Xcode project to reproduce the problem.

Please add some additional information to your bug report explaining what you were trying to do and the situation where this crash occurs. Add a small Xcode project that demonstrates the problem. Include some directions engineering can use together with your Xcode project to reproduce the problem.

Xcode Crash on View Hierarchy debugger for mixed UIKit / SwiftUI app
 
 
Q