A great while ago I learned about the debugQuickLookObject function and my imagination went wild with convenient uses for it while debugging.
Recently I remembered it vaguely and tried to find documentation for it and found it quite difficult to locate.
I did find this old documentation:
https://developer.apple.com/library/archive/documentation/IDEs/Conceptual/CustomClassDisplay_in_QuickLook/CH01-quick_look_for_custom_objects/CH01-quick_look_for_custom_objects.html
and this:
https://developer.apple.com/library/archive/documentation/IDEs/Conceptual/CustomClassDisplay_in_QuickLook/CH02-std_objects_support/CH02-std_objects_support.html#//apple_ref/doc/uid/TP40014001-CH3-SW1
but nothing showing usages of it in Swift. The most recent example I could find was a "hackingwithswift" post with a single usage of it to display a string.
I was really hoping that I could get a SwiftUI view to show up using it since it is supposed to be able to display UIViews but I couldn't even get a UIView to show up.
Long story short it would be AWESOME to be able to use this to show SwiftUI views while debugging. With how easy it is to create SwiftUI views to display data/visuals it would be really cool to make various debug-oriented views for showing in the debug quick look.
Imagine if these views were interactive too! You could almost extend the variables view of the debugger to show whatever you wanted.
Recently I remembered it vaguely and tried to find documentation for it and found it quite difficult to locate.
I did find this old documentation:
https://developer.apple.com/library/archive/documentation/IDEs/Conceptual/CustomClassDisplay_in_QuickLook/CH01-quick_look_for_custom_objects/CH01-quick_look_for_custom_objects.html
and this:
https://developer.apple.com/library/archive/documentation/IDEs/Conceptual/CustomClassDisplay_in_QuickLook/CH02-std_objects_support/CH02-std_objects_support.html#//apple_ref/doc/uid/TP40014001-CH3-SW1
but nothing showing usages of it in Swift. The most recent example I could find was a "hackingwithswift" post with a single usage of it to display a string.
I was really hoping that I could get a SwiftUI view to show up using it since it is supposed to be able to display UIViews but I couldn't even get a UIView to show up.
Long story short it would be AWESOME to be able to use this to show SwiftUI views while debugging. With how easy it is to create SwiftUI views to display data/visuals it would be really cool to make various debug-oriented views for showing in the debug quick look.
Imagine if these views were interactive too! You could almost extend the variables view of the debugger to show whatever you wanted.