Debugging co-routines / threading is a pain in any language. I'm a big believer in observability anyway so this isn't a leap. Nor is it the first time I did this very thing, but last time I had implemented a console and it was a console command. This is in a product written in Python which implements a DNS gateway for Redis:
# dig @sophia.m3047 coroutines.redis.sophia.m3047 txt +short
"write_control:1"
"get:3"
"statistics_report:1"
"process_pending_queue:1"
The implementing code (not including turning it into a DNS response) is surprisingly simple: https://github.com/m3047/rkvdns/blob/f6fba9523a83aa5125378bb...