Implement 'Skip simple getters' for debugger
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at onGetter.kt:9
|
||||
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! onGetter.OnGetterKt
|
||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
onGetter.kt:9
|
||||
onGetter.kt:12
|
||||
Compile bytecode for prop
|
||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at skipSimpleGetter.kt:6
|
||||
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! skipSimpleGetter.SkipSimpleGetterKt
|
||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
skipSimpleGetter.kt:6
|
||||
skipSimpleGetter.kt:7
|
||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -0,0 +1,12 @@
|
||||
package onGetter
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val a = A(1)
|
||||
// EXPRESSION: prop
|
||||
// RESULT: 1: I
|
||||
// STEP_INTO: 1
|
||||
//Breakpoint!
|
||||
a.prop
|
||||
}
|
||||
|
||||
class A(val prop: Int)
|
||||
@@ -0,0 +1,25 @@
|
||||
package skipSimpleGetter
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val a = A(1)
|
||||
//Breakpoint!
|
||||
a.a1 + a.a2 + a.a3 + a.a4
|
||||
}
|
||||
|
||||
class A(val a4: Int) {
|
||||
// only init
|
||||
val a1 = 1
|
||||
|
||||
// simple get, expression body
|
||||
val a2: Int = 1
|
||||
get() = field
|
||||
|
||||
// simple get, block body
|
||||
val a3: Int = 1
|
||||
get() {
|
||||
return field
|
||||
}
|
||||
}
|
||||
|
||||
// STEP_INTO: 21
|
||||
// SKIP_GETTERS: true
|
||||
Reference in New Issue
Block a user