A way to debug SharedFlow?

I have a SharedFlow which has many subscribers which are pretty frequently subscribe/unsubscribe and I want somehow to print current subscribers to verify that all required subscribers are running and all should-be-completed collectors are unsubscribed.

I found only subscriptionCount flow, which is better than nothing, but it gives no information of specific subscribers

In sources I have found onSubscription extension function which is very likely what I need but have no success to use it - returned flow is the same as original, and action passed as parameter is not called.

I know, the nature of collecting data in different scopes/dispatchers limits possibilities to debug them but maybe there is a way?

Dumb solution, put a println() in your SharedFlow’s lambda, that prints the name and hash of the Collector it’s emitting an item to? I don’t really know how a SharedFlow works, but at the end of the day, a Collector instance is passed and values are provided to it, so maybe you could just print out the Collector every time a value is emitted.