'How to debug accessibility events that VoiceOver on macOS receives?

I'm working on getting VoiceOver to read out text updates in an unfocused widget - as part of this, I'd like to be able to see all of the events that the macOS VoiceOver client is receiving on its end. How can I do that?

I see macOS provides an Accessibility Inspector and an Accessibility Verifier, but neither of those tools seem to target events.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source