Hide unrelated this entries in Kotlin Watches mode

This commit is contained in:
Yan Zhulanow
2018-12-14 21:28:50 +09:00
parent e5b0d2e34f
commit cf9461847b
7 changed files with 185 additions and 27 deletions
@@ -0,0 +1,16 @@
package hideSyntheticThis
fun main() {
block("foo") {
//Breakpoint!
val b = 4
}
}
fun <T> block(t: T, block: T.() -> Unit) {
t.block()
}
// PRINT_FRAME
// SHOW_KOTLIN_VARIABLES
// DESCRIPTOR_VIEW_OPTIONS: NAME_EXPRESSION
@@ -0,0 +1,30 @@
LineBreakpoint created at hideSyntheticThis.kt:6
Run Java
Connected to the target VM
hideSyntheticThis.kt:6
package hideSyntheticThis
fun main() {
block("foo") {
//Breakpoint!
val b = 4
}
}
fun <T> block(t: T, block: T.() -> Unit) {
t.block()
}
// PRINT_FRAME
// SHOW_KOTLIN_VARIABLES
// DESCRIPTOR_VIEW_OPTIONS: NAME_EXPRESSION
frame = invoke
local = this (expression = this)
field = value (expression = this.value)
element = 0 (expression = this.value[0])
element = 1 (expression = this.value[1])
element = 2 (expression = this.value[2])
field = hash (expression = this.hash)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,20 @@
package remapThis
fun main() {
Bar().bar()
}
class Bar {
fun bar() {
"a".foo()
}
fun String.foo() {
//Breakpoint!
val a = this
}
}
// PRINT_FRAME
// SHOW_KOTLIN_VARIABLES
// DESCRIPTOR_VIEW_OPTIONS: NAME_EXPRESSION
@@ -0,0 +1,34 @@
LineBreakpoint created at remapThis.kt:14
Run Java
Connected to the target VM
remapThis.kt:14
package remapThis
fun main() {
Bar().bar()
}
class Bar {
fun bar() {
"a".foo()
}
fun String.foo() {
//Breakpoint!
val a = this
}
}
// PRINT_FRAME
// SHOW_KOTLIN_VARIABLES
// DESCRIPTOR_VIEW_OPTIONS: NAME_EXPRESSION
frame = foo
this = this (@Bar) (expression = this)
-
local = this (expression = this)
field = value (expression = this.value)
element = 0 (expression = this.value[0])
field = hash (expression = this.hash)
Disconnected from the target VM
Process finished with exit code 0