Debugger: breakpoints in library source files

This commit is contained in:
Natalia Ukhorskaya
2014-08-19 12:23:40 +04:00
parent 91f7f2479d
commit 453592edf4
21 changed files with 403 additions and 11 deletions
@@ -0,0 +1,6 @@
package customLib.breakpointOnLocalProperty
public fun breakpointOnLocalPropertyFun(): Int {
val a = 1
return 1
}
@@ -0,0 +1,5 @@
package customLib.breakpointOnLocalProperty
public fun breakpointOnLocalPropertyFun2(): Int {
return 1
}
@@ -0,0 +1,4 @@
package customLib.property
public val foo: Int =
1
@@ -0,0 +1,5 @@
package customLib.property
public fun someFun(): Int {
return 1
}
@@ -0,0 +1,17 @@
LineBreakpoint created at 1.kt:3
LineBreakpoint created at 1.kt:3
LineBreakpoint created at 1.kt:3
LineBreakpoint created at 1.kt:3
!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! customLibClassName.CustomLibClassNamePackage
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
1.kt:3
Compile bytecode for 1 + 1
1.kt:3
Compile bytecode for 1 + 2
1.kt:3
Compile bytecode for 1 + 3
1.kt:3
Compile bytecode for 1 + 4
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 Delegation.kt:48
!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! stdlibDelegatedProperty.StdlibDelegatedPropertyPackage
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Delegation.kt:48
Compile bytecode for value.toString()
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 Ranges.kt:7
!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! stdlibRange.StdlibRangePackage
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Ranges.kt:7
Compile bytecode for start <= item
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 StringsJVM.kt:163
!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! stdlibSlice.StdlibSlicePackage
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
StringsJVM.kt:163
Compile bytecode for range.start
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,24 @@
package customLibClassName
fun main(args: Array<String>) {
customLib.oneFunSameFileName.oneFunSameFileNameFun()
customLib.twoFunDifferentSignature.twoFunDifferentSignatureFun()
customLib.property.foo
customLib.breakpointOnLocalProperty.breakpointOnLocalPropertyFun()
}
// ADDITIONAL_BREAKPOINT: 1.kt:public fun oneFunSameFileNameFun(): Int {
// EXPRESSION: 1 + 1
// RESULT: 2: I
// ADDITIONAL_BREAKPOINT: 1.kt:public fun twoFunDifferentSignatureFun(): Int {
// EXPRESSION: 1 + 2
// RESULT: 3: I
// ADDITIONAL_BREAKPOINT: 1.kt:public val foo: Int =
// EXPRESSION: 1 + 3
// RESULT: 4: I
// ADDITIONAL_BREAKPOINT: 1.kt:public fun breakpointOnLocalPropertyFun(): Int {
// EXPRESSION: 1 + 4
// RESULT: 5: I
@@ -0,0 +1,15 @@
package stdlibDelegatedProperty
import kotlin.properties.Delegates
var prop: Int by Delegates.notNull()
fun main(args: Array<String>) {
prop = 3
val a = prop
}
// ADDITIONAL_BREAKPOINT: Delegation.kt:public override fun set(thisRef: Any?, desc: PropertyMetadata, value: T) {
// EXPRESSION: value.toString()
// RESULT: "3": Ljava/lang/String;
@@ -0,0 +1,14 @@
package stdlibRange
fun main(args: Array<String>) {
A().rangeTo(A()).contains(A())
}
class A: Comparable<A> {
override fun compareTo(other: A) = 0
}
// ADDITIONAL_BREAKPOINT: Ranges.kt:override fun contains(item: T): Boolean {
// EXPRESSION: start <= item
// RESULT: 1: Z
@@ -0,0 +1,11 @@
package stdlibSlice
fun main(args: Array<String>) {
val c: CharSequence = "CharSequence"
c.slice(0..1)
}
// ADDITIONAL_BREAKPOINT: StringsJVM.kt:CharSequence.slice(range: IntRange): CharSequence
// EXPRESSION: range.start
// RESULT: 0: I