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 https://github.com/pointfreeco/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 https://github.com/pointfreeco/swift-snapshot-testing/issues/375