Skip to content

Provide an API to check whether debug mode is enabled #2551

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
qwwdfsad opened this issue Feb 24, 2021 · 1 comment
Open

Provide an API to check whether debug mode is enabled #2551

qwwdfsad opened this issue Feb 24, 2021 · 1 comment

Comments

@qwwdfsad
Copy link
Collaborator

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)
@qwwdfsad
Copy link
Collaborator Author

Also, it's worth adding unwrap function and separate stacktrace recovery check.

We already bump into this in our own modules: 89fd2c1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant