Debugger: Coroutines stack frames with variables & coroutine dumps
This commit is contained in:
committed by
Vladimir Ilmov
parent
c459b2ca6e
commit
5975251a32
@@ -0,0 +1,6 @@
|
||||
package noCoroutines
|
||||
|
||||
fun main() {
|
||||
//Breakpoint!
|
||||
val s = "nothing to see here, folks"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
LineBreakpoint created at noCoroutines.kt:5
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
noCoroutines.kt:5
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -0,0 +1,13 @@
|
||||
package threeCoroutines
|
||||
|
||||
import kotlin.random.Random
|
||||
|
||||
suspend fun main() {
|
||||
sequence {
|
||||
yield(239)
|
||||
sequence {
|
||||
//Breakpoint!
|
||||
yield(666)
|
||||
}.toList()
|
||||
}.toList()
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
LineBreakpoint created at threeCoroutines.kt:10
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
threeCoroutines.kt:10
|
||||
"coroutine#1", state: RUNNING
|
||||
"coroutine#2", state: RUNNING
|
||||
"coroutine#3", state: RUNNING
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -0,0 +1,31 @@
|
||||
package twoDumps
|
||||
|
||||
suspend fun main() {
|
||||
foo()
|
||||
sequence<Int> {
|
||||
foo()
|
||||
yield(666)
|
||||
}.toList()
|
||||
}
|
||||
|
||||
suspend fun foo() {
|
||||
val f = 239
|
||||
bar()
|
||||
}
|
||||
|
||||
suspend fun bar() {
|
||||
var r = 1337
|
||||
//Breakpoint!
|
||||
r += 42
|
||||
}
|
||||
|
||||
suspend fun SequenceScope<Int>.foo() {
|
||||
val k = 228
|
||||
bar()
|
||||
}
|
||||
|
||||
suspend fun SequenceScope<Int>.bar() {
|
||||
var r = 1337
|
||||
//Breakpoint!
|
||||
r += 42
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
LineBreakpoint created at twoDumps.kt:19
|
||||
LineBreakpoint created at twoDumps.kt:30
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
twoDumps.kt:19
|
||||
"coroutine#1", state: RUNNING
|
||||
twoDumps.kt:30
|
||||
"coroutine#1", state: RUNNING
|
||||
"coroutine#2", state: RUNNING
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Reference in New Issue
Block a user