Move debugger test data to the new location

This commit is contained in:
Yan Zhulanow
2019-09-27 00:13:53 +09:00
parent b4cc5703de
commit d8d81c51d7
1423 changed files with 0 additions and 0 deletions
@@ -0,0 +1,185 @@
package clearCache
import java.util.ArrayList
import java.util.HashSet
fun primitiveTypes() {
if (true) {
val a: Any = if (1 == 1) 0 else "abc"
// EXPRESSION: a
// RESULT: instance of java.lang.Integer(id=ID): Ljava/lang/Integer;
//Breakpoint!
val b = 1
}
if (true) {
val a = 1
// EXPRESSION: a
// RESULT: 1: I
//Breakpoint!
val b = 1
}
for (i in 1..2) {
// EXPRESSION: i
// RESULT: 1: I
// EXPRESSION: i
// RESULT: 2: I
//Breakpoint!
val b = 1
}
for (i in 'a'..'b') {
// EXPRESSION: i
// RESULT: 97: C
// EXPRESSION: i
// RESULT: 98: C
//Breakpoint!
val b = 1
}
}
fun subType() {
if (true) {
val o = Base()
// EXPRESSION: o.test()
// RESULT: 100: I
//Breakpoint!
val b = 1
}
if (true) {
val o = Derived()
// EXPRESSION: o.test()
// RESULT: 200: I
//Breakpoint!
val b = 1
}
}
open class Base {
open fun test() = 100
}
class Derived: Base() {
override fun test() = 200
}
fun subTypePlatform() {
if (true) {
val c: MutableList<String> = ArrayList<String>()
// EXPRESSION: c.size
// RESULT: 0: I
//Breakpoint!
val b = 1
}
if (true) {
val c: List<String> = ArrayList<String>()
// EXPRESSION: c.size
// RESULT: 0: I
//Breakpoint!
val b = 1
}
if (true) {
val c = ArrayList<String>()
c.add("a")
// EXPRESSION: c.size
// RESULT: 1: I
//Breakpoint!
val b = 1
}
if (true) {
val c = ArrayList<Int>()
c.add(1)
c.add(2)
// EXPRESSION: c.size
// RESULT: 2: I
//Breakpoint!
val b = 1
}
if (true) {
val c = HashSet<Int>()
// EXPRESSION: c.size
// RESULT: 0: I
//Breakpoint!
val b = 1
}
}
fun innerClass() {
if (true) {
val o = TestInnerClasses.Base()
// EXPRESSION: o.test()
// RESULT: 100: I
//Breakpoint!
val b = 1
}
if (true) {
val o = TestInnerClasses.Derived()
// EXPRESSION: o.test()
// RESULT: 200: I
//Breakpoint!
val b = 1
}
}
class TestInnerClasses {
open class Base {
open fun test() = 100
}
class Derived: Base() {
override fun test() = 200
}
}
fun objects() {
// EXPRESSION: obj.test()
// RESULT: 1: I
//Breakpoint!
val a1 = 1
// EXPRESSION: obj.test()
// RESULT: 1: I
//Breakpoint!
val a2 = 1
if (true) {
val o: BaseObject = obj
// EXPRESSION: o.test()
// RESULT: 1: I
//Breakpoint!
val b = 1
}
if (true) {
val o = obj
// EXPRESSION: o.test()
// RESULT: 1: I
//Breakpoint!
val b = 1
}
}
internal val obj = object: BaseObject() { }
open class BaseObject {
fun test() = 1
}
fun main(args: Array<String>) {
primitiveTypes()
subType()
subTypePlatform()
innerClass()
objects()
}
@@ -0,0 +1,58 @@
LineBreakpoint created at clearCache.kt:12
LineBreakpoint created at clearCache.kt:20
LineBreakpoint created at clearCache.kt:31
LineBreakpoint created at clearCache.kt:42
LineBreakpoint created at clearCache.kt:52
LineBreakpoint created at clearCache.kt:60
LineBreakpoint created at clearCache.kt:78
LineBreakpoint created at clearCache.kt:86
LineBreakpoint created at clearCache.kt:95
LineBreakpoint created at clearCache.kt:105
LineBreakpoint created at clearCache.kt:113
LineBreakpoint created at clearCache.kt:123
LineBreakpoint created at clearCache.kt:131
LineBreakpoint created at clearCache.kt:149
LineBreakpoint created at clearCache.kt:154
LineBreakpoint created at clearCache.kt:161
LineBreakpoint created at clearCache.kt:169
Run Java
Connected to the target VM
clearCache.kt:12
Compile bytecode for a
clearCache.kt:20
Compile bytecode for a
clearCache.kt:31
Compile bytecode for i
clearCache.kt:31
clearCache.kt:42
Compile bytecode for i
clearCache.kt:42
clearCache.kt:52
Compile bytecode for o.test()
clearCache.kt:60
Compile bytecode for o.test()
clearCache.kt:78
Compile bytecode for c.size
clearCache.kt:86
Compile bytecode for c.size
clearCache.kt:95
Compile bytecode for c.size
clearCache.kt:105
Compile bytecode for c.size
clearCache.kt:113
Compile bytecode for c.size
clearCache.kt:123
Compile bytecode for o.test()
clearCache.kt:131
Compile bytecode for o.test()
clearCache.kt:149
Compile bytecode for obj.test()
clearCache.kt:154
Compile bytecode for obj.test()
clearCache.kt:161
Compile bytecode for o.test()
clearCache.kt:169
Compile bytecode for o.test()
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,85 @@
package constructors
class Derived2(): Base(1) {
// constructor with body
// EXPRESSION: p
// RESULT: 1: I
//FunctionBreakpoint!
constructor(p: Int): this() {
// EXPRESSION: p + 1
// RESULT: 2: I
//Breakpoint!
val a = 1
}
// constructor without body
// EXPRESSION: p1 + p2
// RESULT: 2: I
//FunctionBreakpoint!
constructor(p1: Int, p2: Int): this()
}
// EXPRESSION: i1
// RESULT: 1: I
class Derived1(
i1: Int
//Breakpoint!
): Base(i1)
open class Base(i: Int)
fun main(args: Array<String>) {
Derived2(1)
Derived2(1, 1)
Derived1(1)
A()
AA()
B()
C(1)
D()
E(1)
F("foo")
}
// EXPRESSION: 1 + 1
// RESULT: 2: I
//FunctionBreakpoint!
class A
// EXPRESSION: 1 + 3
// RESULT: 4: I
//FunctionBreakpoint!
class AA {
}
// EXPRESSION: 1 + 2
// RESULT: 3: I
//FunctionBreakpoint!
class B()
// EXPRESSION: a
// RESULT: 1: I
//FunctionBreakpoint!
class C(val a: Int)
class D {
// EXPRESSION: 1 + 3
// RESULT: 4: I
//FunctionBreakpoint!
constructor()
}
class E {
// EXPRESSION: i
// RESULT: 1: I
//FunctionBreakpoint!
constructor(i: Int)
}
// EXPRESSION: a
// RESULT: "foo": Ljava/lang/String;
//FunctionBreakpoint!
class F(val a: String)
@@ -0,0 +1,38 @@
FunctionBreakpoint created at constructors.kt:9
LineBreakpoint created at constructors.kt:13
FunctionBreakpoint created at constructors.kt:20
LineBreakpoint created at constructors.kt:28
FunctionBreakpoint created at constructors.kt:50
FunctionBreakpoint created at constructors.kt:55
FunctionBreakpoint created at constructors.kt:62
FunctionBreakpoint created at constructors.kt:67
FunctionBreakpoint created at constructors.kt:73
FunctionBreakpoint created at constructors.kt:79
FunctionBreakpoint created at constructors.kt:85
Run Java
Connected to the target VM
constructors.kt:9
Compile bytecode for p
constructors.kt:13
Compile bytecode for p + 1
constructors.kt:20
Compile bytecode for p1 + p2
constructors.kt:28
Compile bytecode for i1
constructors.kt:50
Compile bytecode for 1 + 1
constructors.kt:55
Compile bytecode for 1 + 3
constructors.kt:62
Compile bytecode for 1 + 2
constructors.kt:67
Compile bytecode for a
constructors.kt:73
Compile bytecode for 1 + 3
constructors.kt:79
Compile bytecode for i
constructors.kt:85
Compile bytecode for a
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,65 @@
package exceptions
import java.util.ArrayList
fun throwException() {
// EXPRESSION: fail()
// RESULT: Method threw 'java.lang.UnsupportedOperationException' exception.
//Breakpoint!
val a = 1
// EXPRESSION: fail()
// RESULT: Method threw 'java.lang.UnsupportedOperationException' exception.
//Breakpoint!
val b = 1
}
fun fail() {
throw UnsupportedOperationException()
}
fun classCast() {
val o = Base()
// EXPRESSION: o as Derived
// RESULT: java.lang.ClassCastException : exceptions.Base cannot be cast to exceptions.Derived
//Breakpoint!
val a = 1
// EXPRESSION: o as Derived
// RESULT: java.lang.ClassCastException : exceptions.Base cannot be cast to exceptions.Derived
//Breakpoint!
val b = 1
}
fun genericClassCast() {
if (true) {
val c = ArrayList<Int>()
c.add(1)
// EXPRESSION: c.get(0)
// RESULT: instance of java.lang.Integer(id=ID): Ljava/lang/Integer;
//Breakpoint!
val b = 1
}
if (true) {
val c = ArrayList<Int>()
(c as? ArrayList<String>)?.add("a")
// EXPRESSION: c.get(0) + 1
// RESULT: java.lang.ClassCastException : java.lang.String cannot be cast to java.lang.Number
//Breakpoint!
val b = 1
}
}
open class Base {
private fun test(): Int = 1
}
class Derived: Base()
fun main(args: Array<String>) {
throwException()
classCast()
genericClassCast()
}
@@ -0,0 +1,23 @@
LineBreakpoint created at exceptions.kt:9
LineBreakpoint created at exceptions.kt:14
LineBreakpoint created at exceptions.kt:26
LineBreakpoint created at exceptions.kt:31
LineBreakpoint created at exceptions.kt:42
LineBreakpoint created at exceptions.kt:51
Run Java
Connected to the target VM
exceptions.kt:9
Compile bytecode for fail()
exceptions.kt:14
Compile bytecode for fail()
exceptions.kt:26
Compile bytecode for o as Derived
exceptions.kt:31
Compile bytecode for o as Derived
exceptions.kt:42
Compile bytecode for c.get(0)
exceptions.kt:51
Compile bytecode for c.get(0) + 1
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,120 @@
package extensionMemberFunction
fun main(args: Array<String>) {
MemberClass().testMember(ExtClass())
MemberClass.testCompanion(ExtClass())
}
class MemberClass {
fun testMember(extClass: ExtClass) {
// EXPRESSION: extClass.testPublic()
// RESULT: 1: I
//Breakpoint!
extClass.testPublic()
with(extClass) {
// EXPRESSION: testPublic()
// RESULT: 1: I
//Breakpoint!
testPublic()
}
// EXPRESSION: extClass.testPrivate()
// RESULT: 1: I
//Breakpoint!
extClass.testPrivate()
with(extClass) {
// EXPRESSION: testPrivate()
// RESULT: 1: I
//Breakpoint!
testPrivate()
}
extClass.testExtMember()
}
fun ExtClass.testExtMember() {
// EXPRESSION: testPublic()
// RESULT: 1: I
//Breakpoint!
testPublic()
// EXPRESSION: this.testPublic()
// RESULT: 1: I
//Breakpoint!
this.testPublic()
// EXPRESSION: testPrivate()
// RESULT: 1: I
//Breakpoint!
testPrivate()
// EXPRESSION: this.testPrivate()
// RESULT: 1: I
//Breakpoint!
this.testPrivate()
}
public fun ExtClass.testPublic() = a
private fun ExtClass.testPrivate() = a
companion object {
public fun ExtClass.testCompPublic() = a
private fun ExtClass.testCompPrivate() = a
fun testCompanion(extClass: ExtClass) {
// EXPRESSION: extClass.testCompPublic()
// RESULT: 1: I
//Breakpoint!
extClass.testCompPublic()
with(extClass) {
// EXPRESSION: testCompPublic()
// RESULT: 1: I
//Breakpoint!
testCompPublic()
}
// EXPRESSION: extClass.testCompPrivate()
// RESULT: 1: I
//Breakpoint!
extClass.testCompPrivate()
with(extClass) {
// EXPRESSION: testCompPrivate()
// RESULT: 1: I
//Breakpoint!
testCompPrivate()
}
extClass.testExtCompanion()
}
fun ExtClass.testExtCompanion() {
// EXPRESSION: testCompPublic()
// RESULT: 1: I
//Breakpoint!
testCompPublic()
// EXPRESSION: this.testCompPublic()
// RESULT: 1: I
//Breakpoint!
this.testCompPublic()
// EXPRESSION: testCompPrivate()
// RESULT: 1: I
//Breakpoint!
testCompPrivate()
// EXPRESSION: this.testCompPrivate()
// RESULT: 1: I
//Breakpoint!
this.testCompPrivate()
}
}
}
class ExtClass {
val a = 1
}
@@ -0,0 +1,53 @@
LineBreakpoint created at extensionMemberFunction.kt:13
LineBreakpoint created at extensionMemberFunction.kt:19
LineBreakpoint created at extensionMemberFunction.kt:25
LineBreakpoint created at extensionMemberFunction.kt:31
LineBreakpoint created at extensionMemberFunction.kt:41
LineBreakpoint created at extensionMemberFunction.kt:46
LineBreakpoint created at extensionMemberFunction.kt:51
LineBreakpoint created at extensionMemberFunction.kt:56
LineBreakpoint created at extensionMemberFunction.kt:70
LineBreakpoint created at extensionMemberFunction.kt:76
LineBreakpoint created at extensionMemberFunction.kt:82
LineBreakpoint created at extensionMemberFunction.kt:88
LineBreakpoint created at extensionMemberFunction.kt:98
LineBreakpoint created at extensionMemberFunction.kt:103
LineBreakpoint created at extensionMemberFunction.kt:108
LineBreakpoint created at extensionMemberFunction.kt:113
Run Java
Connected to the target VM
extensionMemberFunction.kt:13
Compile bytecode for extClass.testPublic()
extensionMemberFunction.kt:19
Compile bytecode for testPublic()
extensionMemberFunction.kt:25
Compile bytecode for extClass.testPrivate()
extensionMemberFunction.kt:31
Compile bytecode for testPrivate()
extensionMemberFunction.kt:41
Compile bytecode for testPublic()
extensionMemberFunction.kt:46
Compile bytecode for this.testPublic()
extensionMemberFunction.kt:51
Compile bytecode for testPrivate()
extensionMemberFunction.kt:56
Compile bytecode for this.testPrivate()
extensionMemberFunction.kt:70
Compile bytecode for extClass.testCompPublic()
extensionMemberFunction.kt:76
Compile bytecode for testCompPublic()
extensionMemberFunction.kt:82
Compile bytecode for extClass.testCompPrivate()
extensionMemberFunction.kt:88
Compile bytecode for testCompPrivate()
extensionMemberFunction.kt:98
Compile bytecode for testCompPublic()
extensionMemberFunction.kt:103
Compile bytecode for this.testCompPublic()
extensionMemberFunction.kt:108
Compile bytecode for testCompPrivate()
extensionMemberFunction.kt:113
Compile bytecode for this.testCompPrivate()
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,27 @@
package extensionMemberFunctionInObject
// KT-14822
fun main(args: Array<String>) {
Foo.bar()
}
object Foo {
fun bar() {
// EXPRESSION: "OK".baz()
// RESULT: 1: I
//Breakpoint!
"OK".baz()
with("OK") {
// EXPRESSION: baz()
// RESULT: 1: I
//Breakpoint!
baz()
}
}
fun String.baz(): Int {
return 1
}
}
@@ -0,0 +1,11 @@
LineBreakpoint created at extensionMemberFunctionInObject.kt:14
LineBreakpoint created at extensionMemberFunctionInObject.kt:20
Run Java
Connected to the target VM
extensionMemberFunctionInObject.kt:14
Compile bytecode for "OK".baz()
extensionMemberFunctionInObject.kt:20
Compile bytecode for baz()
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,124 @@
package extensionMemberProperty
fun main(args: Array<String>) {
MemberClass().testMember(ExtClass())
MemberClass.testCompanion(ExtClass())
}
class MemberClass {
fun testMember(extClass: ExtClass) {
// EXPRESSION: extClass.testPublic
// RESULT: 1: I
//Breakpoint!
extClass.testPublic
with(extClass) {
// EXPRESSION: testPublic
// RESULT: 1: I
//Breakpoint!
testPublic
}
// EXPRESSION: extClass.testPrivate
// RESULT: 1: I
//Breakpoint!
extClass.testPrivate
with(extClass) {
// EXPRESSION: testPrivate
// RESULT: 1: I
//Breakpoint!
testPrivate
}
extClass.testExtMember()
}
fun ExtClass.testExtMember() {
// EXPRESSION: testPublic
// RESULT: 1: I
//Breakpoint!
testPublic
// EXPRESSION: this.testPublic
// RESULT: 1: I
//Breakpoint!
this.testPublic
// EXPRESSION: testPrivate
// RESULT: 1: I
//Breakpoint!
testPrivate
// EXPRESSION: this.testPrivate
// RESULT: 1: I
//Breakpoint!
this.testPrivate
}
public val ExtClass.testPublic: Int
get() = a
private val ExtClass.testPrivate: Int
get() = a
companion object {
public val ExtClass.testCompPublic: Int
get() = a
private val ExtClass.testCompPrivate: Int
get() = a
fun testCompanion(extClass: ExtClass) {
// EXPRESSION: extClass.testCompPublic
// RESULT: 1: I
//Breakpoint!
extClass.testCompPublic
with(extClass) {
// EXPRESSION: testCompPublic
// RESULT: 1: I
//Breakpoint!
testCompPublic
}
// EXPRESSION: extClass.testCompPrivate
// RESULT: 1: I
//Breakpoint!
extClass.testCompPrivate
with(extClass) {
// EXPRESSION: testCompPrivate
// RESULT: 1: I
//Breakpoint!
testCompPrivate
}
extClass.testExtCompanion()
}
fun ExtClass.testExtCompanion() {
// EXPRESSION: testCompPublic
// RESULT: 1: I
//Breakpoint!
testCompPublic
// EXPRESSION: this.testCompPublic
// RESULT: 1: I
//Breakpoint!
this.testCompPublic
// EXPRESSION: testCompPrivate
// RESULT: 1: I
//Breakpoint!
testCompPrivate
// EXPRESSION: this.testCompPrivate
// RESULT: 1: I
//Breakpoint!
this.testCompPrivate
}
}
}
class ExtClass {
val a = 1
}
@@ -0,0 +1,53 @@
LineBreakpoint created at extensionMemberProperty.kt:13
LineBreakpoint created at extensionMemberProperty.kt:19
LineBreakpoint created at extensionMemberProperty.kt:25
LineBreakpoint created at extensionMemberProperty.kt:31
LineBreakpoint created at extensionMemberProperty.kt:41
LineBreakpoint created at extensionMemberProperty.kt:46
LineBreakpoint created at extensionMemberProperty.kt:51
LineBreakpoint created at extensionMemberProperty.kt:56
LineBreakpoint created at extensionMemberProperty.kt:74
LineBreakpoint created at extensionMemberProperty.kt:80
LineBreakpoint created at extensionMemberProperty.kt:86
LineBreakpoint created at extensionMemberProperty.kt:92
LineBreakpoint created at extensionMemberProperty.kt:102
LineBreakpoint created at extensionMemberProperty.kt:107
LineBreakpoint created at extensionMemberProperty.kt:112
LineBreakpoint created at extensionMemberProperty.kt:117
Run Java
Connected to the target VM
extensionMemberProperty.kt:13
Compile bytecode for extClass.testPublic
extensionMemberProperty.kt:19
Compile bytecode for testPublic
extensionMemberProperty.kt:25
Compile bytecode for extClass.testPrivate
extensionMemberProperty.kt:31
Compile bytecode for testPrivate
extensionMemberProperty.kt:41
Compile bytecode for testPublic
extensionMemberProperty.kt:46
Compile bytecode for this.testPublic
extensionMemberProperty.kt:51
Compile bytecode for testPrivate
extensionMemberProperty.kt:56
Compile bytecode for this.testPrivate
extensionMemberProperty.kt:74
Compile bytecode for extClass.testCompPublic
extensionMemberProperty.kt:80
Compile bytecode for testCompPublic
extensionMemberProperty.kt:86
Compile bytecode for extClass.testCompPrivate
extensionMemberProperty.kt:92
Compile bytecode for testCompPrivate
extensionMemberProperty.kt:102
Compile bytecode for testCompPublic
extensionMemberProperty.kt:107
Compile bytecode for this.testCompPublic
extensionMemberProperty.kt:112
Compile bytecode for testCompPrivate
extensionMemberProperty.kt:117
Compile bytecode for this.testCompPrivate
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,27 @@
package fieldVariable
class Foo {
val a: String? = "field"
get() {
//Breakpoint!
val a = 5
return "not a " + field
}
val b: String?
get() {
//Breakpoint!
return "b"
}
}
fun main() {
Foo().a
Foo().b
}
// EXPRESSION: field
// RESULT: "field": Ljava/lang/String;
// EXPRESSION: field
// RESULT: Cannot find the backing field 'b'
@@ -0,0 +1,11 @@
LineBreakpoint created at fieldVariable.kt:7
LineBreakpoint created at fieldVariable.kt:14
Run Java
Connected to the target VM
fieldVariable.kt:7
Compile bytecode for field
fieldVariable.kt:14
Compile bytecode for field
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,42 @@
package funFromOuterClassInLamdba
fun main(args: Array<String>) {
Outer().Inner().test()
}
class Outer {
fun foo() = 1
inner class Inner {
fun innerFun() = 1
fun test() {
fun f() = 1
// outer is captured in lambda
lambda {
// EXPRESSION: foo() + 1
// RESULT: 2: I
//Breakpoint!
val a = foo()
}
// outer isn't captured in lambda
lambda {
// EXPRESSION: foo() + 2
// RESULT: 'this@Outer' is not captured
//Breakpoint!
val a = 1
}
// inner is captured in lambda
lambda {
// EXPRESSION: foo() + 3
// RESULT: 4: I
//Breakpoint!
val a = innerFun()
}
}
}
}
fun lambda(f: () -> Unit) = f()
@@ -0,0 +1,14 @@
LineBreakpoint created at funFromOuterClassInLamdba.kt:20
LineBreakpoint created at funFromOuterClassInLamdba.kt:28
LineBreakpoint created at funFromOuterClassInLamdba.kt:36
Run Java
Connected to the target VM
funFromOuterClassInLamdba.kt:20
Compile bytecode for foo() + 1
funFromOuterClassInLamdba.kt:28
Compile bytecode for foo() + 2
funFromOuterClassInLamdba.kt:36
Compile bytecode for foo() + 3
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,20 @@
package initializer
fun main(args: Array<String>) {
A(1)
}
class A(val prop: Int) {
init {
// EXPRESSION: prop
// RESULT: 1: I
//Breakpoint!
val a = 1
val list = listOf(1)
// EXPRESSION: it
// RESULT: Unresolved reference: it
//Breakpoint! (lambdaOrdinal = -1)
list.map { it * 2 }
}
}
@@ -0,0 +1,10 @@
LineBreakpoint created at initializer.kt:12
LineBreakpoint created at initializer.kt:18 lambdaOrdinal = -1
Run Java
Connected to the target VM
initializer.kt:12
Compile bytecode for prop
initializer.kt:18
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,18 @@
package invisibleDeclarations
fun main(args: Array<String>) {
A()
}
class A() {
private companion object {
val test = 5
}
init {
// EXPRESSION: test
// RESULT: 5: I
//Breakpoint!
val a = 1
}
}
@@ -0,0 +1,8 @@
LineBreakpoint created at invisibleDeclarations.kt:16
Run Java
Connected to the target VM
invisibleDeclarations.kt:16
Compile bytecode for test
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,75 @@
package isInsideInlineLambda
fun main(args: Array<String>) {
val a = A()
// EXPRESSION: it + 1
// RESULT: 2: I
//Breakpoint! (lambdaOrdinal = 1)
a.foo(1) { 1 }
// inside other lambda
a.foo(1) {
// EXPRESSION: it + 2
// RESULT: 3: I
//Breakpoint! (lambdaOrdinal = 1)
a.foo(1) { 1 }
1
}
// inside variable declaration
// EXPRESSION: it + 3
// RESULT: 4: I
//Breakpoint! (lambdaOrdinal = 1)
val x = a.foo(1) { 1 }
// inside object declaration
val y = object {
fun foo() {
// EXPRESSION: it + 4
// RESULT: 5: I
//Breakpoint! (lambdaOrdinal = 1)
a.foo(1) { 1 }
}
}
y.foo()
// inside local function
fun local() {
// EXPRESSION: it + 5
// RESULT: 6: I
//Breakpoint! (lambdaOrdinal = 1)
a.foo(1) { 1 }
}
local()
isInsideInlineLambdaInLibrary.test()
}
class A {
inline fun foo(i: Int, f: (i: Int) -> Int): A {
f(i)
return this
}
}
// ADDITIONAL_BREAKPOINT: isInsideInlineLambdaInLibrary.kt:Breakpoint1:(1)
// EXPRESSION: it + 11
// RESULT: 12: I
// ADDITIONAL_BREAKPOINT: isInsideInlineLambdaInLibrary.kt:Breakpoint2:(1)
// EXPRESSION: it + 12
// RESULT: 14: I
// ADDITIONAL_BREAKPOINT: isInsideInlineLambdaInLibrary.kt:Breakpoint3:(1)
// EXPRESSION: it + 13
// RESULT: 16: I
// ADDITIONAL_BREAKPOINT: isInsideInlineLambdaInLibrary.kt:Breakpoint4:(1)
// EXPRESSION: it + 14
// RESULT: 18: I
// ADDITIONAL_BREAKPOINT: isInsideInlineLambdaInLibrary.kt:Breakpoint5:(1)
// EXPRESSION: it + 15
// RESULT: 20: I
@@ -0,0 +1,35 @@
LineBreakpoint created at isInsideInlineLambdaInLibrary.kt:6 lambdaOrdinal = 1
LineBreakpoint created at isInsideInlineLambdaInLibrary.kt:11 lambdaOrdinal = 1
LineBreakpoint created at isInsideInlineLambdaInLibrary.kt:17 lambdaOrdinal = 1
LineBreakpoint created at isInsideInlineLambdaInLibrary.kt:23 lambdaOrdinal = 1
LineBreakpoint created at isInsideInlineLambdaInLibrary.kt:31 lambdaOrdinal = 1
LineBreakpoint created at isInsideInlineLambda.kt:9 lambdaOrdinal = 1
LineBreakpoint created at isInsideInlineLambda.kt:17 lambdaOrdinal = 1
LineBreakpoint created at isInsideInlineLambda.kt:25 lambdaOrdinal = 1
LineBreakpoint created at isInsideInlineLambda.kt:33 lambdaOrdinal = 1
LineBreakpoint created at isInsideInlineLambda.kt:43 lambdaOrdinal = 1
Run Java
Connected to the target VM
isInsideInlineLambda.kt:9
Compile bytecode for it + 1
isInsideInlineLambda.kt:17
Compile bytecode for it + 2
isInsideInlineLambda.kt:25
Compile bytecode for it + 3
isInsideInlineLambda.kt:33
Compile bytecode for it + 4
isInsideInlineLambda.kt:43
Compile bytecode for it + 5
isInsideInlineLambdaInLibrary.kt:6
Compile bytecode for it + 11
isInsideInlineLambdaInLibrary.kt:11
Compile bytecode for it + 12
isInsideInlineLambdaInLibrary.kt:17
Compile bytecode for it + 13
isInsideInlineLambdaInLibrary.kt:23
Compile bytecode for it + 14
isInsideInlineLambdaInLibrary.kt:31
Compile bytecode for it + 15
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,22 @@
package lambdaParameters
fun fun1(p: String, f: (String) -> Int) {
//Breakpoint!
f(p)
}
inline fun fun2(p: String, crossinline f: (String) -> Int) {
//Breakpoint!
f(p)
}
fun main(args: Array<String>) {
fun1("abc", { x -> x.length })
fun2("abc", { x -> x.length })
}
// EXPRESSION: f("abc")
// RESULT: 3: I
// EXPRESSION: f("abc")
// RESULT: Evaluation of 'crossinline' lambdas is not supported
@@ -0,0 +1,10 @@
LineBreakpoint created at lambdaParameters.kt:5
LineBreakpoint created at lambdaParameters.kt:10
Run Java
Connected to the target VM
lambdaParameters.kt:5
Compile bytecode for f("abc")
lambdaParameters.kt:10
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,29 @@
package customLibClassName
fun main(args: Array<String>) {
customLib.oneFunSameClassName.oneFunSameFileNameFun()
customLib.twoFunDifferentSignature.twoFunDifferentSignatureFun()
customLib.property.foo
customLib.breakpointOnLocalProperty.breakpointOnLocalPropertyFun()
customLib.simpleLibFile.foo()
}
// 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
// ADDITIONAL_BREAKPOINT: simpleLibFile.kt:public fun foo() {
// EXPRESSION: 1 + 5
// RESULT: 6: I
@@ -0,0 +1,20 @@
LineBreakpoint created at a1.kt:6
LineBreakpoint created at a1.kt:6
LineBreakpoint created at a1.kt:6
LineBreakpoint created at a1.kt:6
LineBreakpoint created at simpleLibFile.kt:4
Run Java
Connected to the target VM
a1.kt:6
Compile bytecode for 1 + 1
a1.kt:6
Compile bytecode for 1 + 2
a1.kt:6
Compile bytecode for 1 + 3
a1.kt:6
Compile bytecode for 1 + 4
simpleLibFile.kt:4
Compile bytecode for 1 + 5
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,9 @@
package localFunInLibrary
fun main(args: Array<String>) {
customLib.localFunInLibraryCustomLib.localFunInLibraryCustomLibMainFun()
}
// ADDITIONAL_BREAKPOINT: localFunCustomLib.kt:localFunInLibraryCustomLibProperty
// EXPRESSION: localFun()
// RESULT: 1: I
@@ -0,0 +1,8 @@
LineBreakpoint created at localFunCustomLib.kt:6
Run Java
Connected to the target VM
localFunCustomLib.kt:6
Compile bytecode for localFun()
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,72 @@
package localFun
fun main(args: Array<String>) {
fun myLocalFun1() = 1
// EXPRESSION: myLocalFun1()
// RESULT: 1: I
//Breakpoint!
myLocalFun1()
fun myLocalFun2() = 2
// EXPRESSION: myLocalFun2()
// RESULT: 2: I
//Breakpoint!
myLocalFun2()
fun myLocalFun3() {
// EXPRESSION: myLocalFun1() + 1
// RESULT: Cannot find local variable 'myLocalFun1' with type kotlin.jvm.functions.Function0
//Breakpoint!
myLocalFun1() + 1
}
myLocalFun3()
fun myLocalFun4(): Int {
return 1
}
// EXPRESSION: myLocalFun4()
// RESULT: 1: I
//Breakpoint!
myLocalFun4()
fun myLocalFun5(i: Int): Int {
return i
}
// EXPRESSION: myLocalFun5(2)
// RESULT: 2: I
//Breakpoint!
myLocalFun5(2)
var i = 1
fun myLocalFun6(): Int {
i++
return i
}
// EXPRESSION: myLocalFun6()
// RESULT: 2: I
//Breakpoint!
myLocalFun6()
i = 1
fun myLocalFun7() {
// EXPRESSION: myLocalFun6() + 1
// RESULT: Cannot find local variable 'myLocalFun6' with type kotlin.jvm.functions.Function0
//Breakpoint!
myLocalFun6() + 1
}
myLocalFun7()
fun <T> myLocalFun8(): T = 1 as T
// EXPRESSION: myLocalFun8<Int>()
// RESULT: 1: I
//Breakpoint!
myLocalFun8<Int>()
}
@@ -0,0 +1,29 @@
LineBreakpoint created at localFun.kt:9
LineBreakpoint created at localFun.kt:15
LineBreakpoint created at localFun.kt:21
LineBreakpoint created at localFun.kt:34
LineBreakpoint created at localFun.kt:43
LineBreakpoint created at localFun.kt:54
LineBreakpoint created at localFun.kt:61
LineBreakpoint created at localFun.kt:71
Run Java
Connected to the target VM
localFun.kt:9
Compile bytecode for myLocalFun1()
localFun.kt:15
Compile bytecode for myLocalFun2()
localFun.kt:21
Compile bytecode for myLocalFun1() + 1
localFun.kt:34
Compile bytecode for myLocalFun4()
localFun.kt:43
Compile bytecode for myLocalFun5(2)
localFun.kt:54
Compile bytecode for myLocalFun6()
localFun.kt:61
Compile bytecode for myLocalFun6() + 1
localFun.kt:71
Compile bytecode for myLocalFun8<Int>()
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,76 @@
package multipleBreakpointsAtLine
fun main(args: Array<String>) {
val a = A()
// EXPRESSION: it + 1
// RESULT: Unresolved reference: it
//Breakpoint! (lambdaOrdinal = -1)
a.foo(1) { 1 }.foo(2) { 1 }
// EXPRESSION: it + 2
// RESULT: 3: I
//Breakpoint! (lambdaOrdinal = 1)
a.foo(1) { 1 }.foo(2) { 1 }
// EXPRESSION: it + 3
// RESULT: 5: I
//Breakpoint! (lambdaOrdinal = 2)
a.foo(1) { 1 }.foo(2) { 1 }
// EXPRESSION: it + 4
// RESULT: Unresolved reference: it
// EXPRESSION: it + 5
// RESULT: 6: I
// EXPRESSION: it + 6
// RESULT: 8: I
//Breakpoint!
a.foo(1) { 1 }.foo(2) { 1 }
// EXPRESSION: it + 8
// RESULT: Unresolved reference: it
//Breakpoint! (lambdaOrdinal = -1)
a.bar(1) { 1 }.bar(2) { 1 }
// EXPRESSION: it + 9
// RESULT: 10: I
//Breakpoint! (lambdaOrdinal = 1)
a.bar(1) { 1 }.bar(2) { 1 }
// EXPRESSION: it + 10
// RESULT: 12: I
//Breakpoint! (lambdaOrdinal = 2)
a.bar(1) { 1 }.bar(2) { 1 }
// EXPRESSION: it + 11
// RESULT: Unresolved reference: it
// EXPRESSION: it + 12
// RESULT: 13: I
// EXPRESSION: it + 14
// RESULT: 16: I
//Breakpoint!
a.bar(1) { 1 }.bar(2) { 1 }
// EXPRESSION: it + 15
// RESULT: 17: I
//Breakpoint! (lambdaOrdinal = 2)
a.bar(1) { 1 }.bar(2) { 1 + 1
1 + 1
}
}
class A {
fun foo(i: Int, f: (i: Int) -> Int): A {
f(i)
return this
}
inline fun bar(i: Int, f: (i: Int) -> Int): A {
f(i)
return this
}
}
@@ -0,0 +1,36 @@
LineBreakpoint created at multipleBreakpointsAtLine.kt:9 lambdaOrdinal = -1
LineBreakpoint created at multipleBreakpointsAtLine.kt:14 lambdaOrdinal = 1
LineBreakpoint created at multipleBreakpointsAtLine.kt:19 lambdaOrdinal = 2
LineBreakpoint created at multipleBreakpointsAtLine.kt:30
LineBreakpoint created at multipleBreakpointsAtLine.kt:35 lambdaOrdinal = -1
LineBreakpoint created at multipleBreakpointsAtLine.kt:40 lambdaOrdinal = 1
LineBreakpoint created at multipleBreakpointsAtLine.kt:45 lambdaOrdinal = 2
LineBreakpoint created at multipleBreakpointsAtLine.kt:56
LineBreakpoint created at multipleBreakpointsAtLine.kt:61 lambdaOrdinal = 2
Run Java
Connected to the target VM
multipleBreakpointsAtLine.kt:9
multipleBreakpointsAtLine.kt:14
Compile bytecode for it + 2
multipleBreakpointsAtLine.kt:19
Compile bytecode for it + 3
multipleBreakpointsAtLine.kt:30
multipleBreakpointsAtLine.kt:30
Compile bytecode for it + 5
multipleBreakpointsAtLine.kt:30
Compile bytecode for it + 6
multipleBreakpointsAtLine.kt:35
multipleBreakpointsAtLine.kt:40
Compile bytecode for it + 9
multipleBreakpointsAtLine.kt:45
Compile bytecode for it + 10
multipleBreakpointsAtLine.kt:56
multipleBreakpointsAtLine.kt:56
Compile bytecode for it + 12
multipleBreakpointsAtLine.kt:56
Compile bytecode for it + 14
multipleBreakpointsAtLine.kt:61
Compile bytecode for it + 15
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,24 @@
package mutations
fun main() {
var a = 5
val b = 3
//Breakpoint!
val x = 0
//Breakpoint!
val y = 0
//Breakpoint!
val z = 0
}
// EXPRESSION: a = 100
// RESULT: VOID_VALUE
// EXPRESSION: b = 200
// RESULT: VOID_VALUE
// EXPRESSION: a + b
// RESULT: 300: I
@@ -0,0 +1,14 @@
LineBreakpoint created at mutations.kt:8
LineBreakpoint created at mutations.kt:11
LineBreakpoint created at mutations.kt:14
Run Java
Connected to the target VM
mutations.kt:8
Compile bytecode for a = 100
mutations.kt:11
Compile bytecode for b = 200
mutations.kt:14
Compile bytecode for a + b
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,79 @@
package nonCapturedVariables
fun main() {
val a = 5
inlineBlock {
//Breakpoint!
val b = 6
inlineBlock {
//Breakpoint!
val c = 7
block {
//Breakpoint!
val d = 8
inlineBlock {
//Breakpoint!
val e = 9
block {
//Breakpoint!
val f = 10
block {
//Breakpoint!
val g = 11
//Breakpoint!
val g2 = 12
//Breakpoint!
val g3 = 13
//Breakpoint!
val g4 = 14
}
}
}
}
}
}
}
private fun block(block: () -> Unit) {
block()
}
private inline fun inlineBlock(block: () -> Unit) {
block()
}
// EXPRESSION: a
// RESULT: 5: I
// EXPRESSION: b
// RESULT: 6: I
// EXPRESSION: c
// RESULT: 'c' is not captured
// EXPRESSION: d
// RESULT: 8: I
// EXPRESSION: e
// RESULT: 'e' is not captured
// EXPRESSION: f
// RESULT: 'f' is not captured
// EXPRESSION: e
// RESULT: 'e' is not captured
// EXPRESSION: d
// RESULT: 'd' is not captured
// EXPRESSION: c
// RESULT: 'c' is not captured
@@ -0,0 +1,32 @@
LineBreakpoint created at nonCapturedVariables.kt:8
LineBreakpoint created at nonCapturedVariables.kt:12
LineBreakpoint created at nonCapturedVariables.kt:16
LineBreakpoint created at nonCapturedVariables.kt:20
LineBreakpoint created at nonCapturedVariables.kt:24
LineBreakpoint created at nonCapturedVariables.kt:28
LineBreakpoint created at nonCapturedVariables.kt:31
LineBreakpoint created at nonCapturedVariables.kt:34
LineBreakpoint created at nonCapturedVariables.kt:37
Run Java
Connected to the target VM
nonCapturedVariables.kt:8
Compile bytecode for a
nonCapturedVariables.kt:12
Compile bytecode for b
nonCapturedVariables.kt:16
Compile bytecode for c
nonCapturedVariables.kt:20
Compile bytecode for d
nonCapturedVariables.kt:24
Compile bytecode for e
nonCapturedVariables.kt:28
Compile bytecode for f
nonCapturedVariables.kt:31
Compile bytecode for e
nonCapturedVariables.kt:34
Compile bytecode for d
nonCapturedVariables.kt:37
Compile bytecode for c
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,46 @@
package privateMembersPriority
fun main(args: Array<String>) {
Receiver2().test1()
test2()
test3()
}
class Receiver1 {
private fun privateFun() = 1
}
class Receiver2 {
fun privateFun() = 2
fun test1() {
with(Receiver1()) {
// EXPRESSION: privateFun()
// RESULT: 2: I
//Breakpoint!
privateFun()
}
}
}
// In debuggerContext there are two properties size in ArrayList (java field + kotlin property)
fun test2() {
val javaClass = arrayListOf(1)
// EXPRESSION: javaClass.size
// RESULT: 1: I
//Breakpoint!
javaClass.size
}
fun test3() {
// EXPRESSION: TwoPrivateFun().foo(1)
// RESULT: 1: I
//Breakpoint!
val a = 1
}
class TwoPrivateFun {
private fun foo(i: Int) = 1
private fun foo(i: Double) = 2
}
@@ -0,0 +1,14 @@
LineBreakpoint created at privateMembersPriority.kt:21
LineBreakpoint created at privateMembersPriority.kt:33
LineBreakpoint created at privateMembersPriority.kt:40
Run Java
Connected to the target VM
privateMembersPriority.kt:21
Compile bytecode for privateFun()
privateMembersPriority.kt:33
Compile bytecode for javaClass.size
privateMembersPriority.kt:40
Compile bytecode for TwoPrivateFun().foo(1)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,19 @@
package remappedParameterInInline
inline fun watch(p: String, f: (String) -> Int) {
f(p)
}
inline fun inlineDefault(p: Int = 1, f: (Int) -> Unit) {
// EXPRESSION: p
// RESULT: 1: I
//Breakpoint!
f(p)
}
fun main(args: Array<String>) {
val local = "mno"
watch(local) { it.length }
inlineDefault { it }
}
@@ -0,0 +1,8 @@
LineBreakpoint created at remappedParameterInInline.kt:11
Run Java
Connected to the target VM
remappedParameterInInline.kt:11
Compile bytecode for p
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,35 @@
package smartcasts
fun main(args: Array<String>) {
test1(Derived())
test1(Base())
test2(Derived())
test2(null)
}
// EXPRESSION: derived.prop
// RESULT: 1: I
// EXPRESSION: derived.prop
// RESULT: java.lang.ClassCastException : smartcasts.Base cannot be cast to smartcasts.Derived
fun test1(derived: Base) =
derived is Derived &&
//Breakpoint!
derived.prop == 1
// EXPRESSION: nullable.prop
// RESULT: 1: I
// EXPRESSION: nullable.prop
// RESULT: java.lang.NullPointerException
fun test2(nullable: Derived?) =
nullable != null &&
//Breakpoint!
nullable.prop == 1
class Derived : Base() {
val prop = 1
}
open class Base
@@ -0,0 +1,13 @@
LineBreakpoint created at smartcasts.kt:19
LineBreakpoint created at smartcasts.kt:29
Run Java
Connected to the target VM
smartcasts.kt:19
Compile bytecode for derived.prop
smartcasts.kt:19
smartcasts.kt:29
Compile bytecode for nullable.prop
smartcasts.kt:29
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,31 @@
package thisLabels
fun main() {
block(1) a@ {
//Breakpoint!
inlineBlock(2) b@ {
//Breakpoint!
block(3) c@ {
//Breakpoint!
val a = this@a + this@b + this@c
}
}
}
}
fun <T> block(t: T, block: T.() -> Unit) {
t.block()
}
fun <T> T.inlineBlock(t: T, block: T.() -> Unit) {
t.block()
}
// EXPRESSION: this
// RESULT: 1: I
// EXPRESSION: this
// RESULT: 2: I
// EXPRESSION: this + this@a + this@b + this@c
// RESULT: 9: I
@@ -0,0 +1,14 @@
LineBreakpoint created at thisLabels.kt:6
LineBreakpoint created at thisLabels.kt:8
LineBreakpoint created at thisLabels.kt:10
Run Java
Connected to the target VM
thisLabels.kt:6
Compile bytecode for this
thisLabels.kt:8
Compile bytecode for this
thisLabels.kt:10
Compile bytecode for this + this@a + this@b + this@c
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,31 @@
package whenEntry
fun main(args: Array<String>) {
val a = 1
// EXPRESSION: a
// RESULT: 1: I
val b = when {
//Breakpoint!
a == 1 -> 1 + 1
else -> 1 + 2
}
// EXPRESSION: a
// RESULT: 1: I
val c = when {
//Breakpoint!
a == 1 -> { 1 + 1 }
else -> 1 + 2
}
// EXPRESSION: a
// RESULT: 1: I
val d = when {
//Breakpoint!
a == 1 -> {
1 + 1
}
else -> 1 + 2
}
}
@@ -0,0 +1,14 @@
LineBreakpoint created at whenEntry.kt:10
LineBreakpoint created at whenEntry.kt:18
LineBreakpoint created at whenEntry.kt:26
Run Java
Connected to the target VM
whenEntry.kt:10
Compile bytecode for a
whenEntry.kt:18
Compile bytecode for a
whenEntry.kt:26
Compile bytecode for a
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,57 @@
package withoutBodyFunctions
import kotlin.properties.Delegates
// EXPRESSION: 1 + 1
// RESULT: 2: I
val aGet: Int
//FunctionBreakpoint!
get() = 1
// EXPRESSION: 1 + 2
// RESULT: 3: I
val aGet2: Int
//FunctionBreakpoint!
get() { return 1 }
fun fooWithBody(i: Int): Int {
// EXPRESSION: i
// RESULT: 2: I
//Breakpoint!
return i
}
// EXPRESSION: i
// RESULT: 2: I
//FunctionBreakpoint!
fun foo(i: Int) = i
// EXPRESSION: i
// RESULT: 2: I
//FunctionBreakpoint!
fun fooOneLine(i: Int): Int { return 1 }
// EXPRESSION: i
// RESULT: 2: I
//FunctionBreakpoint!
fun fooEmpty(i: Int) {}
object A {
// EXPRESSION: test2()
// RESULT: 2: I
//FunctionBreakpoint!
@JvmStatic fun fooWithoutBodyInsideObject() = test2()
fun test2() = 2
}
fun main(args: Array<String>) {
aGet
aGet2
fooWithBody(2)
foo(2)
fooOneLine(2)
fooEmpty(2)
A.fooWithoutBodyInsideObject()
}
@@ -0,0 +1,26 @@
FunctionBreakpoint created at withoutBodyFunctions.kt:9
FunctionBreakpoint created at withoutBodyFunctions.kt:15
LineBreakpoint created at withoutBodyFunctions.kt:21
FunctionBreakpoint created at withoutBodyFunctions.kt:27
FunctionBreakpoint created at withoutBodyFunctions.kt:32
FunctionBreakpoint created at withoutBodyFunctions.kt:37
FunctionBreakpoint created at withoutBodyFunctions.kt:43
Run Java
Connected to the target VM
withoutBodyFunctions.kt:9
Compile bytecode for 1 + 1
withoutBodyFunctions.kt:15
Compile bytecode for 1 + 2
withoutBodyFunctions.kt:21
Compile bytecode for i
withoutBodyFunctions.kt:27
Compile bytecode for i
withoutBodyFunctions.kt:32
Compile bytecode for i
withoutBodyFunctions.kt:37
Compile bytecode for i
withoutBodyFunctions.kt:43
Compile bytecode for test2()
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,42 @@
package withoutBodyProperties
import kotlin.properties.Delegates
// EXPRESSION: 1 + 1
// RESULT: 2: I
//FieldWatchpoint! (a)
val a = 1
// EXPRESSION: 1 + 3
// RESULT: 4: I
//FieldWatchpoint! (aLambda)
val aLambda = { 1 + 1 }
class A {
init {
// EXPRESSION: i
// RESULT: 1: I
for (i in 1..1) {
//Breakpoint!
val a = 1
}
}
// EXPRESSION: 1 + 6
// RESULT: 7: I
//FieldWatchpoint! (prop)
val prop = 1
fun test()= prop
}
fun main(args: Array<String>) {
a
aLambda
A().test()
}
// WATCH_FIELD_INITIALISATION: true
// WATCH_FIELD_ACCESS: false
// WATCH_FIELD_MODIFICATION: false
@@ -0,0 +1,17 @@
KotlinFieldBreakpoint created at withoutBodyProperties.kt:8
KotlinFieldBreakpoint created at withoutBodyProperties.kt:13
LineBreakpoint created at withoutBodyProperties.kt:21
KotlinFieldBreakpoint created at withoutBodyProperties.kt:28
Run Java
Connected to the target VM
withoutBodyProperties.kt:8
Compile bytecode for 1 + 1
withoutBodyProperties.kt:13
Compile bytecode for 1 + 3
withoutBodyProperties.kt:21
Compile bytecode for i
withoutBodyProperties.kt:28
Compile bytecode for 1 + 6
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,21 @@
package withoutBodyProperties2
import kotlin.properties.Delegates
// EXPRESSION: 1 + 4
// RESULT: 5: I
//FieldWatchpoint! (aWoBody)
val aWoBody: Int get() = 1
// EXPRESSION: 1 + 5
// RESULT: 6: I
//FieldWatchpoint! (aWoBody2)
val aWoBody2: Int get() { return 1 }
fun main(args: Array<String>) {
aWoBody
aWoBody2
}
// WATCH_FIELD_ACCESS: true
// WATCH_FIELD_MODIFICATION: false
@@ -0,0 +1,11 @@
KotlinFieldBreakpoint created at withoutBodyProperties2.kt:8
KotlinFieldBreakpoint created at withoutBodyProperties2.kt:13
Run Java
Connected to the target VM
withoutBodyProperties2.kt:8
Compile bytecode for 1 + 4
withoutBodyProperties2.kt:13
Compile bytecode for 1 + 5
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,14 @@
package withoutBodyTypeParameters
import kotlin.properties.Delegates
// EXPRESSION: i
// RESULT: instance of java.lang.Integer(id=ID): Ljava/lang/Integer;
//FunctionBreakpoint!
fun <T> foo(i: T) = i
fun run(i: () -> Int) = 1
fun main(args: Array<String>) {
foo(2)
}
@@ -0,0 +1,8 @@
FunctionBreakpoint created at withoutBodyTypeParameters.kt:8
Run Java
Connected to the target VM
withoutBodyTypeParameters.kt:8
Compile bytecode for i
Disconnected from the target VM
Process finished with exit code 0