Debugger: Change the inline depth calculation heuristics, fix debugging for inlined lambdas (KT-30919)

This commit is contained in:
Yan Zhulanow
2019-05-22 17:04:50 +09:00
parent 9c9d2b5ad4
commit afa0bec6f6
4 changed files with 51 additions and 9 deletions
@@ -0,0 +1,25 @@
package nestedInlineFun
fun main() {
val a = 1
foo {
val b = 2
//Breakpoint!
val c = 0
}
}
inline fun foo(block: () -> Unit) {
val x = 3
bar(1, block)
}
inline fun bar(count: Int, block: () -> Unit) {
var i = count
while (i-- > 0) {
block()
}
}
// SHOW_KOTLIN_VARIABLES
// PRINT_FRAME
@@ -0,0 +1,10 @@
LineBreakpoint created at nestedInlineFun.kt:8
Run Java
Connected to the target VM
nestedInlineFun.kt:8
frame = main:8, NestedInlineFunKt {nestedInlineFun}
local = a: int = 1 (sp = nestedInlineFun.kt, 4)
local = b: int = 2 (sp = nestedInlineFun.kt, 6)
Disconnected from the target VM
Process finished with exit code 0