Field WatchPoints: add ability to stop at initializer

This commit is contained in:
Natalia Ukhorskaya
2015-06-05 18:28:43 +03:00
parent d7375e0dc4
commit 14f90f15e5
9 changed files with 199 additions and 60 deletions
+11
View File
@@ -0,0 +1,11 @@
KotlinFieldBreakpoint created at fwInitializer.kt:11
KotlinFieldBreakpoint created at fwInitializer.kt:16
KotlinFieldBreakpoint created at fwInitializer.kt:20
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !APP_PATH!\classes;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! fwInitializer.FwInitializerPackage
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
fwInitializer.kt:12
fwInitializer.kt:17
fwInitializer.kt:21
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,27 @@
package fwInitializer
fun main(args: Array<String>) {
A()
}
fun foo(): Int {
return 1
}
//FieldWatchpoint! (topLevelProp)
val topLevelProp = foo()
class A {
companion object {
//FieldWatchpoint! (companionObjProp)
val companionObjProp = foo()
}
//FieldWatchpoint! (prop)
val prop = foo()
}
// RESUME: 2
// WATCH_FIELD_INITIALISATION: true
// WATCH_FIELD_MODIFICATION: false
// WATCH_FIELD_ACCESS: false