Support "Force Step Over" action over suspended calls (KT-18453)

#KT-18453 Fixed
This commit is contained in:
Nikolay Krasko
2017-06-13 18:16:18 +03:00
parent 0e8e8ef546
commit 850568b8e9
8 changed files with 83 additions and 8 deletions
@@ -0,0 +1,36 @@
package sofSuspendableCallInFun
import forTests.builder
import kotlin.coroutines.experimental.Continuation
import kotlin.coroutines.experimental.suspendCoroutine
private fun foo(a: Any) {}
fun main(args: Array<String>) {
builder {
inFun()
}
foo("Main end")
Thread.sleep(100)
}
suspend fun inFun() {
//Breakpoint!
run()
foo("End")
}
suspend fun run() {
//Breakpoint!
foo("This breakpoint should be skipped")
suspendCoroutine { cont: Continuation<Unit> ->
Thread {
cont.resume(Unit)
Thread.sleep(10)
}.start()
}
}
// STEP_OVER_FORCE: 2
@@ -0,0 +1,10 @@
LineBreakpoint created at sofSuspendableCallInFun.kt:20
LineBreakpoint created at sofSuspendableCallInFun.kt:26
Run Java
Connected to the target VM
sofSuspendableCallInFun.kt:20
sofSuspendableCallInFun.kt:18
sofSuspendableCallInFun.kt:21
Disconnected from the target VM
Process finished with exit code 0