Debugger: Support synchronized blocks and functions in evaluator (KT-11888)

This commit is contained in:
Yan Zhulanow
2019-04-16 20:15:20 +03:00
parent 55bbcc4601
commit ee0daae2ab
5 changed files with 49 additions and 0 deletions
@@ -0,0 +1,9 @@
package synchronizedBlock
fun main() {
//Breakpoint!
val a = 5
}
// EXPRESSION: synchronized(Any()) { "foo" }
// RESULT: "foo": Ljava/lang/String;
@@ -0,0 +1,10 @@
class Foo {
@Synchronized
fun foo(): Int {
return 5
}
}
Foo().foo()
// RESULT: 5: I
@@ -0,0 +1,18 @@
LineBreakpoint created at synchronizedBlock.kt:5
Run Java
Connected to the target VM
synchronizedBlock.kt:5
Compile bytecode for synchronized(Any()) { "foo" }
Compile bytecode for class Foo {
@Synchronized
fun foo(): Int {
return 5
}
}
Foo().foo()
// RESULT: 5: I
Disconnected from the target VM
Process finished with exit code 0