[coroutines debugger]: Added more tests for coroutine stepping

* `unsupported` folders contain scenarios that currently behave incorrectly

GitOrigin-RevId: 686d0a5b3d0dd3da1df3592346ca1c4af333f449
This commit is contained in:
Maria Sokolova
2024-04-16 19:43:00 +02:00
committed by intellij-monorepo-bot
parent 36ab7e705a
commit cb34736703
62 changed files with 2029 additions and 183 deletions

View File

@@ -32,8 +32,11 @@ public final class CoroutinesDebugHelper {
public static long tryGetContinuationId(Object continuation) throws ReflectiveOperationException {
Object rootContinuation = getCoroutineOwner(continuation);
Object debugCoroutineInfo = getField(rootContinuation, DEBUG_COROUTINE_INFO_FIELD);
return (long) getField(debugCoroutineInfo, SEQUENCE_NUMBER_FIELD);
if (rootContinuation.getClass().getSimpleName().contains(COROUTINE_OWNER_CLASS)) {
Object debugCoroutineInfo = getField(rootContinuation, DEBUG_COROUTINE_INFO_FIELD);
return (long) getField(debugCoroutineInfo, SEQUENCE_NUMBER_FIELD);
}
return -1;
}
// This method tries to extract CoroutineOwner as a root coroutine frame,