I want to be able to run a custom script for Xcode on a Debug View Hierarchy to inspect runtime AutoLayout errors. This is extensible to other debugging scenarios such as threading and runtime crashes I suppose, as well as AVPlayer. Xcode has a Behaviors pane accessible via Xcode->Preferences->Behaviors for improving developer workflow with custom automations like opening new tabs, navigating to issues and selecting sidepanels.
I have tried to trigger a new Xcode tab on Debug View Hierarchy as follows:
This works for capturing GPU Frames, but doesn't work for Debugging View Hierarchy. Here's what I mean:
My question is how can I create an Xcode behaviour to trigger on exclusively the Debug View Hierarchy event. Note I could set a breakpoint for Running -> Pauses but then this blocks every breakpoint and does not differentiate between different types of execution interruption.
Adding custom behaviors for different types of breakpoint e.g Exception, Symbolic and Test Failure would also be great. Ideally I want to stay in Xcode, but would be open to tooling with AppleScript too. I tried using AppleScript via the run Custom Script option, but couldn't open a new tab with a given name or detect the type of interruption definitively.
Thanks for the help.

