Skip to content

Coroutine scope is not always captured in coroutine stack frame #2522

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

Closed
nikita-nazarov opened this issue Feb 4, 2021 · 0 comments
Closed
Assignees

Comments

@nikita-nazarov
Copy link
Contributor

For coroutine stack frame's this object sometimes you can't see L$0 in its field list.
Screen Shot 2021-01-29 at 12 07 12 PM
Screen Shot 2021-01-29 at 12 07 33 PM

Note

You won't be able to reproduce this example in the debugger, because synthetic this objects are not shown in the variables view. I tweaked the code to illustrate the problem.

Why is it important

In Kotlin debugger we need to remap this object from Continuation to CoroutineScope for coroutine stack frames. This remap is needed to keep information in the variables view consistent with type hints, and also without it, evaluation in some cases won't work properly. To solve the problem we try to get CoroutineScope from the completion field, however, I assume that it is better to use L$0 for this purpose.

@qwwdfsad qwwdfsad self-assigned this Feb 4, 2021
qwwdfsad added a commit that referenced this issue Feb 5, 2021
pablobaxter pushed a commit to pablobaxter/kotlinx.coroutines that referenced this issue Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants