Open
Description
We already have a notion of debug mode in our documentation, but we do not have an API to check whether the mode is enabled.
It can be useful in multiple scenarios:
- To write unit tests that work both with and without debug mode
- We already do that in our MPP tests
- To verify and debug program behaviour (see Narrowing down cause of
ChildCancelledException
with no stack trace #2550) - To write your own extensions to coroutines that may exhibit an additional behaviour when debug mode is enabled (stacktrace for cancellation exception subclasses, context markers and so on)