Support "Force Step Over" action over suspended calls (KT-18453)
#KT-18453 Fixed
This commit is contained in:
+36
@@ -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
|
||||
+10
@@ -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
|
||||
Reference in New Issue
Block a user