SwiftUI debugDescription

What’s the best way to generate a text description of a SwiftUI hierarchy at runtime?

I use text-based snapshot testing for UIKit views using GitHub - pointfreeco/swift-snapshot-testing: 📸 Delightful Swift snapshot testing.. I would like to do something similar as I start to adopt SwiftUI. Specifically how changes in State show/hide subviews or change property values.

I have no suggestion for what this should look like, but i hope this is the right place to track the discussion.

1 Like

I also made a GitHub issue over at Feature: SwiftUI text-based snapshot testing · Issue #375 · pointfreeco/swift-snapshot-testing · GitHub