Move debugger test data to the new location
This commit is contained in:
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
package anonymousFunAsParamDefaultValue
|
||||
|
||||
fun foo(a: (String) -> String = fun(b: String): String {
|
||||
listOf("").map {
|
||||
//Breakpoint!
|
||||
val a = it.length
|
||||
}
|
||||
|
||||
//Breakpoint!
|
||||
return b
|
||||
}) {
|
||||
a("")
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
foo()
|
||||
}
|
||||
|
||||
// RESUME: 2
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at anonymousFunAsParamDefaultValue.kt:6
|
||||
LineBreakpoint created at anonymousFunAsParamDefaultValue.kt:10
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
anonymousFunAsParamDefaultValue.kt:6
|
||||
anonymousFunAsParamDefaultValue.kt:10
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
package constantConditions
|
||||
|
||||
fun main() {
|
||||
trueIf()
|
||||
falseIf()
|
||||
elseIf()
|
||||
whileFalse()
|
||||
whileTrue()
|
||||
}
|
||||
|
||||
private fun trueIf() {
|
||||
//Breakpoint!
|
||||
if (true)
|
||||
foo("true")
|
||||
else
|
||||
foo("false")
|
||||
}
|
||||
|
||||
private fun falseIf() {
|
||||
//Breakpoint!
|
||||
if(false)
|
||||
foo("false")
|
||||
else
|
||||
foo("true")
|
||||
}
|
||||
|
||||
private fun elseIf() {
|
||||
//Breakpoint!
|
||||
if (false)
|
||||
foo("false")
|
||||
//Breakpoint!
|
||||
else if (true)
|
||||
foo("true")
|
||||
}
|
||||
|
||||
|
||||
private fun whileFalse() {
|
||||
//Breakpoint!
|
||||
while (false)
|
||||
foo("while false")
|
||||
}
|
||||
|
||||
|
||||
private fun whileTrue() {
|
||||
//Breakpoint!
|
||||
while (true)
|
||||
break
|
||||
}
|
||||
|
||||
private fun foo(text: String) {}
|
||||
|
||||
// RESUME: 6
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
LineBreakpoint created at constantConditions.kt:13
|
||||
LineBreakpoint created at constantConditions.kt:21
|
||||
LineBreakpoint created at constantConditions.kt:29
|
||||
LineBreakpoint created at constantConditions.kt:32
|
||||
LineBreakpoint created at constantConditions.kt:39
|
||||
LineBreakpoint created at constantConditions.kt:46
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
constantConditions.kt:13
|
||||
constantConditions.kt:21
|
||||
constantConditions.kt:29
|
||||
constantConditions.kt:32
|
||||
constantConditions.kt:39
|
||||
constantConditions.kt:46
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -0,0 +1,22 @@
|
||||
package coroutine
|
||||
|
||||
import forTests.builder
|
||||
|
||||
suspend fun second() {
|
||||
}
|
||||
|
||||
suspend fun first() {
|
||||
second()
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
// SMART_STEP_INTO_BY_INDEX: 2
|
||||
//Breakpoint!
|
||||
builder {
|
||||
first()
|
||||
}
|
||||
}
|
||||
|
||||
// STEP_OVER: 1
|
||||
|
||||
// TODO: Breakpoint on builder {} is now triggered twice. This is because generated line number on suspend function enter.
|
||||
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at coroutine.kt:15
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
coroutine.kt:15
|
||||
coroutine.kt:15
|
||||
coroutine.kt:16
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package coroutineUnitElimination
|
||||
|
||||
suspend fun main() {
|
||||
//Breakpoint!
|
||||
Unit
|
||||
//Breakpoint!
|
||||
42
|
||||
//Breakpoint!
|
||||
Unit
|
||||
}
|
||||
|
||||
// RESUME: 3
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
LineBreakpoint created at coroutineUnitElimination.kt:5
|
||||
LineBreakpoint created at coroutineUnitElimination.kt:7
|
||||
LineBreakpoint created at coroutineUnitElimination.kt:9
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
coroutineUnitElimination.kt:5
|
||||
coroutineUnitElimination.kt:7
|
||||
coroutineUnitElimination.kt:9
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+161
@@ -0,0 +1,161 @@
|
||||
package crossinlineLiteral
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
callFromTopLevel()
|
||||
A().callFromClass()
|
||||
A.callFromCompanion()
|
||||
genericCall()
|
||||
}
|
||||
|
||||
fun callFromTopLevel() {
|
||||
simpleCall {
|
||||
//Breakpoint!
|
||||
val a = 1
|
||||
}
|
||||
|
||||
simpleCall(fun(i) {
|
||||
//Breakpoint!
|
||||
val a = 1
|
||||
})
|
||||
|
||||
lambdaCall {
|
||||
//Breakpoint!
|
||||
val a = 1
|
||||
}
|
||||
|
||||
lambdaCall(fun(i) {
|
||||
//Breakpoint!
|
||||
val a = 1
|
||||
})
|
||||
|
||||
inlinedLambdaCall {
|
||||
//Breakpoint!
|
||||
val a = 1
|
||||
}
|
||||
|
||||
objectCall {
|
||||
//Breakpoint!
|
||||
val a = 1
|
||||
}
|
||||
|
||||
multipleCrossInline({
|
||||
//Breakpoint!
|
||||
val a = 1
|
||||
}, {
|
||||
//Breakpoint!
|
||||
val a = 1
|
||||
})
|
||||
|
||||
lambdaInInlinedLambdaCall {
|
||||
//Breakpoint!
|
||||
val a = 1
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
fun callFromClass() {
|
||||
objectCall {
|
||||
//Breakpoint!
|
||||
val a = 1
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun callFromCompanion() {
|
||||
objectCall {
|
||||
//Breakpoint!
|
||||
val a = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline fun simpleCall(crossinline f: (Int) -> Unit) {
|
||||
//Breakpoint!
|
||||
f(1)
|
||||
}
|
||||
|
||||
inline fun lambdaCall(crossinline f: (Int) -> Unit) {
|
||||
val a = {
|
||||
//Breakpoint!
|
||||
f(1)
|
||||
}
|
||||
|
||||
a.invoke()
|
||||
}
|
||||
|
||||
inline fun inlinedLambdaCall(crossinline f: (Int) -> Unit) {
|
||||
run {
|
||||
//Breakpoint!
|
||||
f(1)
|
||||
}
|
||||
}
|
||||
|
||||
inline fun objectCall(crossinline f: (Int) -> Unit) {
|
||||
val a = object {
|
||||
init {
|
||||
//Breakpoint!
|
||||
f(1)
|
||||
}
|
||||
|
||||
fun objFun() {
|
||||
//Breakpoint!
|
||||
f(1)
|
||||
}
|
||||
|
||||
val a: Int
|
||||
get() {
|
||||
//Breakpoint!
|
||||
f(1)
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
a.objFun()
|
||||
a.a
|
||||
}
|
||||
|
||||
inline fun multipleCrossInline(crossinline f1: (Int) -> Unit, crossinline f2: (Int) -> Unit) {
|
||||
val a1 = {
|
||||
//Breakpoint!
|
||||
f1(1)
|
||||
}
|
||||
|
||||
a1.invoke()
|
||||
|
||||
val a2 = {
|
||||
//Breakpoint!
|
||||
f2(1)
|
||||
}
|
||||
|
||||
a2.invoke()
|
||||
}
|
||||
|
||||
inline fun lambdaInInlinedLambdaCall(crossinline f: (Int) -> Unit) {
|
||||
run {
|
||||
{
|
||||
//Breakpoint!
|
||||
f(1)
|
||||
}()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun genericCall() {
|
||||
tick(0) { }
|
||||
}
|
||||
|
||||
fun <T> back(f: () -> T) {
|
||||
f()
|
||||
}
|
||||
|
||||
inline fun <V> tick(p: Int, crossinline f: (Int) -> V) {
|
||||
//Breakpoint!
|
||||
f(p)
|
||||
back {
|
||||
//Breakpoint!
|
||||
f(p)
|
||||
}
|
||||
}
|
||||
|
||||
// RESUME: 37
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
LineBreakpoint created at crossinlineLiteral.kt:13
|
||||
LineBreakpoint created at crossinlineLiteral.kt:18
|
||||
LineBreakpoint created at crossinlineLiteral.kt:23
|
||||
LineBreakpoint created at crossinlineLiteral.kt:28
|
||||
LineBreakpoint created at crossinlineLiteral.kt:33
|
||||
LineBreakpoint created at crossinlineLiteral.kt:38
|
||||
LineBreakpoint created at crossinlineLiteral.kt:43
|
||||
LineBreakpoint created at crossinlineLiteral.kt:46
|
||||
LineBreakpoint created at crossinlineLiteral.kt:51
|
||||
LineBreakpoint created at crossinlineLiteral.kt:59
|
||||
LineBreakpoint created at crossinlineLiteral.kt:67
|
||||
LineBreakpoint created at crossinlineLiteral.kt:75
|
||||
LineBreakpoint created at crossinlineLiteral.kt:81
|
||||
LineBreakpoint created at crossinlineLiteral.kt:90
|
||||
LineBreakpoint created at crossinlineLiteral.kt:98
|
||||
LineBreakpoint created at crossinlineLiteral.kt:103
|
||||
LineBreakpoint created at crossinlineLiteral.kt:109
|
||||
LineBreakpoint created at crossinlineLiteral.kt:121
|
||||
LineBreakpoint created at crossinlineLiteral.kt:128
|
||||
LineBreakpoint created at crossinlineLiteral.kt:138
|
||||
LineBreakpoint created at crossinlineLiteral.kt:154
|
||||
LineBreakpoint created at crossinlineLiteral.kt:157
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
crossinlineLiteral.kt:75
|
||||
crossinlineLiteral.kt:13
|
||||
crossinlineLiteral.kt:18
|
||||
crossinlineLiteral.kt:81
|
||||
crossinlineLiteral.kt:23
|
||||
crossinlineLiteral.kt:81
|
||||
crossinlineLiteral.kt:28
|
||||
crossinlineLiteral.kt:90
|
||||
crossinlineLiteral.kt:33
|
||||
crossinlineLiteral.kt:98
|
||||
crossinlineLiteral.kt:38
|
||||
crossinlineLiteral.kt:103
|
||||
crossinlineLiteral.kt:38
|
||||
crossinlineLiteral.kt:109
|
||||
crossinlineLiteral.kt:38
|
||||
crossinlineLiteral.kt:121
|
||||
crossinlineLiteral.kt:43
|
||||
crossinlineLiteral.kt:128
|
||||
crossinlineLiteral.kt:46
|
||||
crossinlineLiteral.kt:138
|
||||
crossinlineLiteral.kt:51
|
||||
crossinlineLiteral.kt:98
|
||||
crossinlineLiteral.kt:59
|
||||
crossinlineLiteral.kt:103
|
||||
crossinlineLiteral.kt:59
|
||||
crossinlineLiteral.kt:109
|
||||
crossinlineLiteral.kt:59
|
||||
crossinlineLiteral.kt:98
|
||||
crossinlineLiteral.kt:67
|
||||
crossinlineLiteral.kt:103
|
||||
crossinlineLiteral.kt:67
|
||||
crossinlineLiteral.kt:109
|
||||
crossinlineLiteral.kt:67
|
||||
crossinlineLiteral.kt:154
|
||||
crossinlineLiteral.kt:157
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -0,0 +1,49 @@
|
||||
package finallyBlock
|
||||
|
||||
fun throwException() { throw RuntimeException() }
|
||||
fun foo() {}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
fun wrap(f: () -> Unit) = try { f() } catch (e: Throwable) {}
|
||||
|
||||
wrap(::test1)
|
||||
wrap(::test2)
|
||||
wrap(::test3)
|
||||
}
|
||||
|
||||
fun test1() {
|
||||
try {
|
||||
//Breakpoint!
|
||||
throwException()
|
||||
} finally {
|
||||
//Breakpoint!
|
||||
foo()
|
||||
}
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
try {
|
||||
//Breakpoint!
|
||||
foo()
|
||||
} finally {
|
||||
//Breakpoint!
|
||||
foo()
|
||||
}
|
||||
}
|
||||
|
||||
fun test3() {
|
||||
try {
|
||||
//Breakpoint!
|
||||
throwException()
|
||||
} finally {
|
||||
//Breakpoint!
|
||||
try {
|
||||
throwException()
|
||||
} finally {
|
||||
//Breakpoint!
|
||||
foo()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// RESUME: 7
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
LineBreakpoint created at finallyBlock.kt:17
|
||||
LineBreakpoint created at finallyBlock.kt:20
|
||||
LineBreakpoint created at finallyBlock.kt:27
|
||||
LineBreakpoint created at finallyBlock.kt:30
|
||||
LineBreakpoint created at finallyBlock.kt:37
|
||||
LineBreakpoint created at finallyBlock.kt:40
|
||||
LineBreakpoint created at finallyBlock.kt:44
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
finallyBlock.kt:17
|
||||
finallyBlock.kt:20
|
||||
finallyBlock.kt:27
|
||||
finallyBlock.kt:30
|
||||
finallyBlock.kt:37
|
||||
finallyBlock.kt:40
|
||||
finallyBlock.kt:44
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -0,0 +1,13 @@
|
||||
package funLiteral
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//Breakpoint!
|
||||
f1() {
|
||||
f2()
|
||||
}
|
||||
}
|
||||
|
||||
fun f1(f: () -> Unit) { f() }
|
||||
fun f2() {}
|
||||
|
||||
// SMART_STEP_INTO_BY_INDEX: 2
|
||||
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at funLiteral.kt:5
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
funLiteral.kt:5
|
||||
funLiteral.kt:6
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
package functionBreakpoints
|
||||
|
||||
//FunctionBreakpoint!
|
||||
class A
|
||||
|
||||
//FunctionBreakpoint!
|
||||
class B()
|
||||
|
||||
//FunctionBreakpoint!
|
||||
class C {}
|
||||
|
||||
//FunctionBreakpoint!
|
||||
class D(val a: Int)
|
||||
|
||||
//FunctionBreakpoint!
|
||||
class E(
|
||||
val a: Int
|
||||
)
|
||||
|
||||
class F(
|
||||
//Breakpoint!
|
||||
val a: Int
|
||||
)
|
||||
|
||||
class G {
|
||||
//FunctionBreakpoint!
|
||||
constructor(a: Int) {}
|
||||
|
||||
//FunctionBreakpoint!
|
||||
constructor(a: String) {}
|
||||
}
|
||||
|
||||
//FunctionBreakpoint!
|
||||
class H(val a: String) {
|
||||
//FunctionBreakpoint!
|
||||
constructor(a: Int) : this("f")
|
||||
}
|
||||
|
||||
//FunctionBreakpoint!
|
||||
class K {
|
||||
//FunctionBreakpoint!
|
||||
fun a() {}
|
||||
|
||||
//FunctionBreakpoint!
|
||||
fun b() {
|
||||
}
|
||||
|
||||
//FunctionBreakpoint!
|
||||
fun c(a: Int) {
|
||||
b()
|
||||
}
|
||||
}
|
||||
|
||||
//FunctionBreakpoint!
|
||||
fun topLevel1() {}
|
||||
|
||||
//FunctionBreakpoint!
|
||||
fun topLevel2(
|
||||
a: Int
|
||||
) {}
|
||||
|
||||
//FunctionBreakpoint!
|
||||
fun topLevel3(a: Int = foo()) {}
|
||||
|
||||
//FunctionBreakpoint!
|
||||
fun foo() = 3
|
||||
|
||||
class L {
|
||||
val a: Int
|
||||
//FunctionBreakpoint!
|
||||
get() = 1
|
||||
|
||||
var b: Int
|
||||
//FunctionBreakpoint!
|
||||
get() = 1
|
||||
//FunctionBreakpoint!
|
||||
set(v) { topLevel2(v) }
|
||||
}
|
||||
|
||||
fun main() {
|
||||
A()
|
||||
B()
|
||||
C()
|
||||
D(0)
|
||||
E(0)
|
||||
F(0)
|
||||
G(0)
|
||||
G("")
|
||||
H(0)
|
||||
H("")
|
||||
|
||||
val k = K()
|
||||
k.a()
|
||||
k.b()
|
||||
k.c(0)
|
||||
|
||||
topLevel1()
|
||||
topLevel2(0)
|
||||
topLevel3()
|
||||
|
||||
val l = L()
|
||||
l.a
|
||||
l.b
|
||||
l.b = 2
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
FunctionBreakpoint created at functionBreakpoints.kt:4
|
||||
FunctionBreakpoint created at functionBreakpoints.kt:7
|
||||
FunctionBreakpoint created at functionBreakpoints.kt:10
|
||||
FunctionBreakpoint created at functionBreakpoints.kt:13
|
||||
FunctionBreakpoint created at functionBreakpoints.kt:16
|
||||
FunctionBreakpoint created at functionBreakpoints.kt:27
|
||||
FunctionBreakpoint created at functionBreakpoints.kt:30
|
||||
FunctionBreakpoint created at functionBreakpoints.kt:34
|
||||
FunctionBreakpoint created at functionBreakpoints.kt:36
|
||||
FunctionBreakpoint created at functionBreakpoints.kt:40
|
||||
FunctionBreakpoint created at functionBreakpoints.kt:42
|
||||
FunctionBreakpoint created at functionBreakpoints.kt:45
|
||||
FunctionBreakpoint created at functionBreakpoints.kt:49
|
||||
FunctionBreakpoint created at functionBreakpoints.kt:55
|
||||
FunctionBreakpoint created at functionBreakpoints.kt:58
|
||||
FunctionBreakpoint created at functionBreakpoints.kt:63
|
||||
FunctionBreakpoint created at functionBreakpoints.kt:66
|
||||
FunctionBreakpoint created at functionBreakpoints.kt:71
|
||||
FunctionBreakpoint created at functionBreakpoints.kt:75
|
||||
FunctionBreakpoint created at functionBreakpoints.kt:77
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
functionBreakpoints.kt:4
|
||||
resuming functionBreakpoints.kt:7
|
||||
resuming functionBreakpoints.kt:10
|
||||
resuming functionBreakpoints.kt:13
|
||||
resuming functionBreakpoints.kt:16
|
||||
resuming functionBreakpoints.kt:27
|
||||
resuming functionBreakpoints.kt:30
|
||||
resuming functionBreakpoints.kt:36
|
||||
resuming functionBreakpoints.kt:34
|
||||
resuming functionBreakpoints.kt:34
|
||||
resuming functionBreakpoints.kt:40
|
||||
resuming functionBreakpoints.kt:42
|
||||
resuming functionBreakpoints.kt:46
|
||||
resuming functionBreakpoints.kt:50
|
||||
resuming functionBreakpoints.kt:46
|
||||
resuming functionBreakpoints.kt:51
|
||||
resuming functionBreakpoints.kt:55
|
||||
resuming functionBreakpoints.kt:60
|
||||
resuming functionBreakpoints.kt:66
|
||||
resuming functionBreakpoints.kt:63
|
||||
resuming functionBreakpoints.kt:71
|
||||
resuming functionBreakpoints.kt:75
|
||||
resuming functionBreakpoints.kt:77
|
||||
resuming functionBreakpoints.kt:60
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+48
@@ -0,0 +1,48 @@
|
||||
package functionCallStoredToVariable
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val a = inlineFunInt {
|
||||
// STEP_OVER: 1
|
||||
//Breakpoint!
|
||||
1
|
||||
}
|
||||
|
||||
// RESUME: 1
|
||||
val b = simpleFunInt {
|
||||
// STEP_OVER: 2
|
||||
//Breakpoint!
|
||||
1
|
||||
}
|
||||
|
||||
// RESUME: 1
|
||||
val c = inlineFunVoid {
|
||||
// STEP_OVER: 2
|
||||
//Breakpoint!
|
||||
val aa = 1
|
||||
}
|
||||
|
||||
// RESUME: 1
|
||||
val d = simpleFunVoid {
|
||||
// STEP_OVER: 3
|
||||
//Breakpoint!
|
||||
val aa = 1
|
||||
}
|
||||
}
|
||||
|
||||
inline fun inlineFunInt(f: () -> Int): Int {
|
||||
val a = 1
|
||||
return f()
|
||||
}
|
||||
|
||||
inline fun inlineFunVoid(f: () -> Unit): Unit {
|
||||
val a = 1
|
||||
return f()
|
||||
}
|
||||
|
||||
fun simpleFunInt(f: () -> Int): Int {
|
||||
return f()
|
||||
}
|
||||
|
||||
fun simpleFunVoid(f: () -> Unit): Unit {
|
||||
return f()
|
||||
}
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
LineBreakpoint created at functionCallStoredToVariable.kt:7
|
||||
LineBreakpoint created at functionCallStoredToVariable.kt:14
|
||||
LineBreakpoint created at functionCallStoredToVariable.kt:21
|
||||
LineBreakpoint created at functionCallStoredToVariable.kt:28
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
functionCallStoredToVariable.kt:7
|
||||
functionCallStoredToVariable.kt:4
|
||||
functionCallStoredToVariable.kt:14
|
||||
functionCallStoredToVariable.kt:43
|
||||
functionCallStoredToVariable.kt:11
|
||||
functionCallStoredToVariable.kt:21
|
||||
functionCallStoredToVariable.kt:22
|
||||
functionCallStoredToVariable.kt:18
|
||||
functionCallStoredToVariable.kt:28
|
||||
functionCallStoredToVariable.kt:29
|
||||
functionCallStoredToVariable.kt:47
|
||||
functionCallStoredToVariable.kt:25
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
package fwAbstractProperty
|
||||
|
||||
// Breakpoint at getter/setter
|
||||
abstract class MyAbstractClass {
|
||||
//FieldWatchpoint! (propVal)
|
||||
abstract val propVal: Int
|
||||
|
||||
//FieldWatchpoint! (propVar)
|
||||
abstract var propVar: Int
|
||||
|
||||
fun testPropertyInAbstractClass() {
|
||||
propVal
|
||||
propVar
|
||||
propVar = 2
|
||||
}
|
||||
}
|
||||
|
||||
class MyAbstractClassImpl : MyAbstractClass() {
|
||||
override val propVal = 1
|
||||
override var propVar = 1
|
||||
|
||||
fun testPropertyInAbstractClassImpl() {
|
||||
propVal
|
||||
propVar
|
||||
propVar = 2
|
||||
}
|
||||
}
|
||||
|
||||
abstract class MyAbstractClassWithoutBreakpoints {
|
||||
abstract val propVal2: Int
|
||||
abstract var propVar2: Int
|
||||
|
||||
fun testPropertyInAbstractClass() {
|
||||
propVal2
|
||||
propVar2
|
||||
propVar2 = 2
|
||||
}
|
||||
}
|
||||
|
||||
// Breakpoint at GETFILED/PUTFIELD
|
||||
class MyAbstractClassImplWithBreakpoints : MyAbstractClassWithoutBreakpoints() {
|
||||
//FieldWatchpoint! (propVal2)
|
||||
override val propVal2 = 1
|
||||
|
||||
//FieldWatchpoint! (propVar2)
|
||||
override var propVar2 = 1
|
||||
|
||||
fun testPropertyInAbstractClassImpl() {
|
||||
propVal2
|
||||
propVar2
|
||||
propVar2 = 2
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val mac = object: MyAbstractClass() {
|
||||
override val propVal: Int get() = 1
|
||||
override var propVar: Int
|
||||
get() = 1
|
||||
set(value) {
|
||||
}
|
||||
}
|
||||
mac.testPropertyInAbstractClass()
|
||||
|
||||
val maci = MyAbstractClassImpl()
|
||||
maci.testPropertyInAbstractClass()
|
||||
maci.testPropertyInAbstractClassImpl()
|
||||
|
||||
val macwb = object: MyAbstractClassWithoutBreakpoints() {
|
||||
override val propVal2: Int get() = 1
|
||||
override var propVar2: Int
|
||||
get() = 1
|
||||
set(value) {
|
||||
}
|
||||
}
|
||||
macwb.testPropertyInAbstractClass()
|
||||
|
||||
val macwbi = MyAbstractClassImplWithBreakpoints()
|
||||
macwbi.testPropertyInAbstractClass()
|
||||
macwbi.testPropertyInAbstractClassImpl()
|
||||
}
|
||||
|
||||
// RESUME: 17
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
KotlinFieldBreakpoint created at fwAbstractProperty.kt:6
|
||||
KotlinFieldBreakpoint created at fwAbstractProperty.kt:9
|
||||
KotlinFieldBreakpoint created at fwAbstractProperty.kt:43
|
||||
KotlinFieldBreakpoint created at fwAbstractProperty.kt:46
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
fwAbstractProperty.kt:57
|
||||
fwAbstractProperty.kt:59
|
||||
fwAbstractProperty.kt:61
|
||||
fwAbstractProperty.kt:19
|
||||
fwAbstractProperty.kt:20
|
||||
fwAbstractProperty.kt:20
|
||||
fwAbstractProperty.kt:19
|
||||
fwAbstractProperty.kt:20
|
||||
fwAbstractProperty.kt:20
|
||||
fwAbstractProperty.kt:43
|
||||
fwAbstractProperty.kt:46
|
||||
fwAbstractProperty.kt:43
|
||||
fwAbstractProperty.kt:46
|
||||
fwAbstractProperty.kt:46
|
||||
fwAbstractProperty.kt:43
|
||||
fwAbstractProperty.kt:46
|
||||
fwAbstractProperty.kt:46
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+27
@@ -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
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
KotlinFieldBreakpoint created at fwInitializer.kt:12
|
||||
KotlinFieldBreakpoint created at fwInitializer.kt:17
|
||||
KotlinFieldBreakpoint created at fwInitializer.kt:21
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
fwInitializer.kt:12
|
||||
fwInitializer.kt:17
|
||||
fwInitializer.kt:21
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
package fwPropertyInInterface
|
||||
|
||||
// Breakpoint at getter/setter
|
||||
interface MyInterface {
|
||||
//FieldWatchpoint! (propVal)
|
||||
val propVal: Int
|
||||
|
||||
//FieldWatchpoint! (propVar)
|
||||
var propVar: Int
|
||||
|
||||
fun testPropertyInInterface() {
|
||||
propVal
|
||||
propVar
|
||||
propVar = 2
|
||||
}
|
||||
}
|
||||
|
||||
class MyInterfaceImpl : MyInterface {
|
||||
override val propVal = 1
|
||||
override var propVar = 1
|
||||
|
||||
fun testPropertyInInterfaceImpl() {
|
||||
propVal
|
||||
propVar
|
||||
propVar = 2
|
||||
}
|
||||
}
|
||||
|
||||
interface MyInterfaceWithoutBreakpoints {
|
||||
val propVal2: Int
|
||||
var propVar2: Int
|
||||
|
||||
fun testPropertyInInterface() {
|
||||
propVal2
|
||||
propVar2
|
||||
propVar2 = 2
|
||||
}
|
||||
}
|
||||
|
||||
// Breakpoint at GETFILED/PUTFIELD
|
||||
class MyInterfaceImplWithBreakpoints : MyInterfaceWithoutBreakpoints {
|
||||
//FieldWatchpoint! (propVal2)
|
||||
override val propVal2 = 1
|
||||
|
||||
//FieldWatchpoint! (propVar2)
|
||||
override var propVar2 = 1
|
||||
|
||||
fun testPropertyInInterfaceImpl() {
|
||||
propVal2
|
||||
propVar2
|
||||
propVar2 = 2
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val mac = object: MyInterface {
|
||||
override val propVal: Int get() = 1
|
||||
override var propVar: Int
|
||||
get() = 1
|
||||
set(value) {
|
||||
}
|
||||
}
|
||||
mac.testPropertyInInterface()
|
||||
|
||||
val maci = MyInterfaceImpl()
|
||||
maci.testPropertyInInterface()
|
||||
maci.testPropertyInInterfaceImpl()
|
||||
|
||||
val macwb = object: MyInterfaceWithoutBreakpoints {
|
||||
override val propVal2: Int get() = 1
|
||||
override var propVar2: Int
|
||||
get() = 1
|
||||
set(value) {
|
||||
}
|
||||
}
|
||||
macwb.testPropertyInInterface()
|
||||
|
||||
val macwbi = MyInterfaceImplWithBreakpoints()
|
||||
macwbi.testPropertyInInterface()
|
||||
macwbi.testPropertyInInterfaceImpl()
|
||||
}
|
||||
|
||||
// RESUME: 17
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
KotlinFieldBreakpoint created at fwPropertyInInterface.kt:6
|
||||
KotlinFieldBreakpoint created at fwPropertyInInterface.kt:9
|
||||
KotlinFieldBreakpoint created at fwPropertyInInterface.kt:43
|
||||
KotlinFieldBreakpoint created at fwPropertyInInterface.kt:46
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
fwPropertyInInterface.kt:57
|
||||
fwPropertyInInterface.kt:59
|
||||
fwPropertyInInterface.kt:61
|
||||
fwPropertyInInterface.kt:19
|
||||
fwPropertyInInterface.kt:20
|
||||
fwPropertyInInterface.kt:20
|
||||
fwPropertyInInterface.kt:19
|
||||
fwPropertyInInterface.kt:20
|
||||
fwPropertyInInterface.kt:20
|
||||
fwPropertyInInterface.kt:43
|
||||
fwPropertyInInterface.kt:46
|
||||
fwPropertyInInterface.kt:43
|
||||
fwPropertyInInterface.kt:46
|
||||
fwPropertyInInterface.kt:46
|
||||
fwPropertyInInterface.kt:43
|
||||
fwPropertyInInterface.kt:46
|
||||
fwPropertyInInterface.kt:46
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -0,0 +1,18 @@
|
||||
package initBlocks
|
||||
|
||||
class Foo {
|
||||
init {
|
||||
//Breakpoint!
|
||||
val a = 5
|
||||
}
|
||||
|
||||
init {
|
||||
val b = 7
|
||||
}
|
||||
}
|
||||
|
||||
fun main() {
|
||||
Foo()
|
||||
}
|
||||
|
||||
// STEP_OVER: 5
|
||||
@@ -0,0 +1,12 @@
|
||||
LineBreakpoint created at initBlocks.kt:6
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
initBlocks.kt:6
|
||||
initBlocks.kt:7
|
||||
initBlocks.kt:10
|
||||
initBlocks.kt:11
|
||||
initBlocks.kt:15
|
||||
initBlocks.kt:16
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package inlineInObject
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//Breakpoint!
|
||||
OtherWithInline.one()
|
||||
}
|
||||
|
||||
object OtherWithInline {
|
||||
inline fun one() {
|
||||
//Breakpoint!
|
||||
println()
|
||||
}
|
||||
}
|
||||
|
||||
// RESUME: 1
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
LineBreakpoint created at inlineInObject.kt:5
|
||||
LineBreakpoint created at inlineInObject.kt:11
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
inlineInObject.kt:5
|
||||
inlineInObject.kt:11
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package inlineInObjectSameFileDex
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//Breakpoint!
|
||||
OtherWithInline.one()
|
||||
}
|
||||
|
||||
object OtherWithInline {
|
||||
inline fun one() {
|
||||
//Breakpoint!
|
||||
println()
|
||||
}
|
||||
}
|
||||
|
||||
// RESUME: 1
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
LineBreakpoint created at inlineInObjectSameFileDex.kt:5
|
||||
LineBreakpoint created at inlineInObjectSameFileDex.kt:11
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
inlineInObjectSameFileDex.kt:5
|
||||
inlineInObjectSameFileDex.kt:11
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package inlineProperties
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
class A {
|
||||
inline val a: String
|
||||
get() {
|
||||
//Breakpoint!
|
||||
return System.nanoTime().toString()
|
||||
}
|
||||
}
|
||||
|
||||
A().apply { a }
|
||||
B().apply { b }
|
||||
}
|
||||
|
||||
class B {
|
||||
inline val b: String
|
||||
get() {
|
||||
//Breakpoint!
|
||||
return System.nanoTime().toString()
|
||||
}
|
||||
}
|
||||
|
||||
// RESUME: 2
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at inlineProperties.kt:8
|
||||
LineBreakpoint created at inlineProperties.kt:20
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
inlineProperties.kt:8
|
||||
inlineProperties.kt:20
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package inlinePropertyAccessors
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
class A {
|
||||
val a: String
|
||||
inline get() {
|
||||
//Breakpoint!
|
||||
return System.nanoTime().toString()
|
||||
}
|
||||
}
|
||||
|
||||
A().apply { a }
|
||||
B().apply { b }
|
||||
}
|
||||
|
||||
class B {
|
||||
val b: String
|
||||
inline get() {
|
||||
//Breakpoint!
|
||||
return System.nanoTime().toString()
|
||||
}
|
||||
}
|
||||
|
||||
// RESUME: 2
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at inlinePropertyAccessors.kt:8
|
||||
LineBreakpoint created at inlinePropertyAccessors.kt:20
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
inlinePropertyAccessors.kt:8
|
||||
inlinePropertyAccessors.kt:20
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -0,0 +1,28 @@
|
||||
package kt15823
|
||||
|
||||
object Some {
|
||||
val collection = mutableListOf<() -> Unit>()
|
||||
|
||||
inline fun inlineWithReified(crossinline lambda: () -> Unit) {
|
||||
collection.add({ lambda() })
|
||||
}
|
||||
|
||||
init {
|
||||
inlineWithReified {
|
||||
//Breakpoint!
|
||||
foo() // Will marked as (X), and never hit, but executes
|
||||
}
|
||||
}
|
||||
|
||||
fun foo() {}
|
||||
|
||||
fun magic() {
|
||||
collection.forEach { it.invoke() }
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
Some.magic()
|
||||
}
|
||||
|
||||
// RESUME: 1
|
||||
@@ -0,0 +1,7 @@
|
||||
LineBreakpoint created at kt15823.kt:13
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
kt15823.kt:13
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -0,0 +1,18 @@
|
||||
package kt17144
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val a = true
|
||||
1 + when (a) {
|
||||
true -> {
|
||||
println("foo")
|
||||
//Breakpoint!
|
||||
1
|
||||
}
|
||||
else -> {
|
||||
println("bar")
|
||||
2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//RESUME: 1
|
||||
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at kt17144.kt:9
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
kt17144.kt:9
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
foo
|
||||
@@ -0,0 +1,18 @@
|
||||
package kt17295
|
||||
|
||||
import java.lang.Thread.sleep
|
||||
import kotlin.concurrent.timer
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
timer("Repeating println", period=100) {
|
||||
//Breakpoint!
|
||||
foo()
|
||||
System.exit(0)
|
||||
}
|
||||
|
||||
sleep(2000)
|
||||
}
|
||||
|
||||
fun foo() {}
|
||||
|
||||
// RESUME: 1
|
||||
@@ -0,0 +1,7 @@
|
||||
LineBreakpoint created at kt17295.kt:9
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
kt17295.kt:9
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
package manyFilesWithInlineCalls1Dex.first
|
||||
|
||||
inline fun firstInline() {
|
||||
// Breakpoint 1
|
||||
1 + 1
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
package manyFilesWithInlineCalls1Dex.second
|
||||
|
||||
inline fun secondInline() {
|
||||
1 + 1
|
||||
}
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
package manyFilesWithInlineCalls1Dex
|
||||
|
||||
import manyFilesWithInlineCalls1Dex.first.*
|
||||
import manyFilesWithInlineCalls1Dex.second.*
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
firstInline()
|
||||
}
|
||||
|
||||
fun unused() {
|
||||
secondInline()
|
||||
}
|
||||
|
||||
// ADDITIONAL_BREAKPOINT: manyFilesWithInlineCalls1Dex.First.kt: Breakpoint 1
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
LineBreakpoint created at manyFilesWithInlineCalls1Dex.First.kt:5
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
manyFilesWithInlineCalls1Dex.First.kt:5
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
package manyFilesWithInlineCalls2Dex.first
|
||||
|
||||
inline fun firstInline() {
|
||||
1 + 1
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
package manyFilesWithInlineCalls2Dex.second
|
||||
|
||||
inline fun secondInline() {
|
||||
// Breakpoint 1
|
||||
1 + 1
|
||||
}
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
package manyFilesWithInlineCalls2Dex
|
||||
|
||||
import manyFilesWithInlineCalls2Dex.first.*
|
||||
import manyFilesWithInlineCalls2Dex.second.*
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
secondInline()
|
||||
}
|
||||
|
||||
fun unused() {
|
||||
firstInline()
|
||||
}
|
||||
|
||||
// ADDITIONAL_BREAKPOINT: manyFilesWithInlineCalls2Dex.Second.kt: Breakpoint 1
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
LineBreakpoint created at manyFilesWithInlineCalls2Dex.Second.kt:5
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
manyFilesWithInlineCalls2Dex.Second.kt:5
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package severalFunLiterals
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val myClass = MyClass()
|
||||
//Breakpoint! (lambdaOrdinal = -1)
|
||||
myClass.f1 { test() }.f2 {
|
||||
test()
|
||||
}
|
||||
}
|
||||
|
||||
class MyClass {
|
||||
fun f1(f1Param: () -> Unit): MyClass {
|
||||
f1Param()
|
||||
return this
|
||||
}
|
||||
|
||||
fun f2(f2Param: () -> Unit): MyClass {
|
||||
f2Param()
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {}
|
||||
|
||||
// SMART_STEP_INTO_BY_INDEX: 4
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at severalFunLiterals.kt:6 lambdaOrdinal = -1
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
severalFunLiterals.kt:6
|
||||
severalFunLiterals.kt:7
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package severalFunLiteralsInClass
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
MyClass().inClass()
|
||||
}
|
||||
|
||||
class MyClass {
|
||||
fun f1(f1Param: () -> Unit): MyClass {
|
||||
f1Param()
|
||||
return this
|
||||
}
|
||||
|
||||
fun f2(f2Param: () -> Unit): MyClass {
|
||||
f2Param()
|
||||
return this
|
||||
}
|
||||
|
||||
fun inClass() {
|
||||
//Breakpoint! (lambdaOrdinal = -1)
|
||||
f1 { test() }.f2 {
|
||||
test()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {}
|
||||
|
||||
// SMART_STEP_INTO_BY_INDEX: 4
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at severalFunLiteralsInClass.kt:20 lambdaOrdinal = -1
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
severalFunLiteralsInClass.kt:20
|
||||
severalFunLiteralsInClass.kt:21
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package severalInlineCallsFromOtherFileDex
|
||||
|
||||
inline fun inlineFun() {
|
||||
var i = 1
|
||||
// Breakpoint 1
|
||||
i++
|
||||
i++
|
||||
}
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
package severalInlineCallsFromOtherFileDex
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//Breakpoint!
|
||||
firstCall()
|
||||
secondCall()
|
||||
}
|
||||
|
||||
fun firstCall() {
|
||||
inlineFun()
|
||||
}
|
||||
|
||||
fun secondCall() {
|
||||
inlineFun()
|
||||
}
|
||||
|
||||
// RESUME: 2
|
||||
// ADDITIONAL_BREAKPOINT: severalInlineCallsFromOtherFileDex.Other.kt: Breakpoint 1
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
LineBreakpoint created at severalInlineCallsFromOtherFileDex.Other.kt:6
|
||||
LineBreakpoint created at severalInlineCallsFromOtherFileDex.kt:5
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
severalInlineCallsFromOtherFileDex.kt:5
|
||||
severalInlineCallsFromOtherFileDex.Other.kt:6
|
||||
severalInlineCallsFromOtherFileDex.Other.kt:6
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+71
@@ -0,0 +1,71 @@
|
||||
package severalInlineCallsFromOtherFileDex
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//Breakpoint!
|
||||
inlineCalls() // line 5
|
||||
}
|
||||
|
||||
fun inlineCalls() {
|
||||
one() // line 23
|
||||
ObjectOne.one() // line 29
|
||||
ClassOne().one() // line 41
|
||||
|
||||
two() // line 66
|
||||
ObjectOne.two() // line 34
|
||||
ClassOne().two() // line 46
|
||||
|
||||
ObjectTwo.one() // line 53
|
||||
ClassTwo().one() // line 60
|
||||
}
|
||||
|
||||
inline fun one() {
|
||||
//Breakpoint!
|
||||
some()
|
||||
}
|
||||
|
||||
object ObjectOne {
|
||||
inline fun one() {
|
||||
//Breakpoint!
|
||||
some()
|
||||
}
|
||||
|
||||
inline fun two() {
|
||||
//Breakpoint!
|
||||
some()
|
||||
}
|
||||
}
|
||||
|
||||
class ClassOne {
|
||||
inline fun one() {
|
||||
//Breakpoint!
|
||||
some()
|
||||
}
|
||||
|
||||
inline fun two() {
|
||||
//Breakpoint!
|
||||
some()
|
||||
}
|
||||
}
|
||||
|
||||
object ObjectTwo {
|
||||
inline fun one() {
|
||||
//Breakpoint!
|
||||
some()
|
||||
}
|
||||
}
|
||||
|
||||
class ClassTwo {
|
||||
inline fun one() {
|
||||
//Breakpoint!
|
||||
some()
|
||||
}
|
||||
}
|
||||
|
||||
inline fun two() {
|
||||
//Breakpoint!
|
||||
some()
|
||||
}
|
||||
|
||||
inline fun some() = 1
|
||||
|
||||
// RESUME: 9
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 1
|
||||
Error: Could not find or load main class severalInlineFunctionsInOneFileDex.SeveralInlineFunctionsInOneFileDexKt
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
package simpleConditionalBreakpoint
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//Breakpoint! (condition = 1 == 1)
|
||||
args.size
|
||||
}
|
||||
|
||||
// RESUME: 1
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
LineBreakpoint created at simpleConditionalBreakpoint.kt:5 condition = 1 == 1
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
simpleConditionalBreakpoint.kt:5
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
package smartStepIntoComponentFunction
|
||||
|
||||
data class Test(val a: Int, val b: Int)
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val t = Test(12, 2)
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
t.component2()
|
||||
}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at smartStepIntoComponentFunction.kt:10
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
smartStepIntoComponentFunction.kt:10
|
||||
smartStepIntoComponentFunction.kt:11
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
package smartStepIntoConstructor
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
B()
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
C(1)
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
D()
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
E(1)
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
F()
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
G(1)
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
J()
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
K(1)
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
L()
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
M()
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
N(1)
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
O(1)
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
O(1, "1")
|
||||
|
||||
}
|
||||
|
||||
class B()
|
||||
class C(val a: Int)
|
||||
class D {
|
||||
constructor()
|
||||
}
|
||||
class E {
|
||||
constructor(i: Int)
|
||||
}
|
||||
class F {
|
||||
constructor() {
|
||||
val a = 1
|
||||
}
|
||||
}
|
||||
class G {
|
||||
constructor(i: Int) {
|
||||
val a = 1
|
||||
}
|
||||
}
|
||||
class J {
|
||||
init {
|
||||
val a = 1
|
||||
}
|
||||
}
|
||||
class K(val i: Int) {
|
||||
init {
|
||||
val a = 1
|
||||
}
|
||||
}
|
||||
class L {
|
||||
constructor() {
|
||||
val a = 1
|
||||
}
|
||||
|
||||
init {
|
||||
val a = 1
|
||||
}
|
||||
}
|
||||
class M {
|
||||
constructor(): this(1) {
|
||||
val a = 1
|
||||
}
|
||||
|
||||
constructor(i: Int) {
|
||||
}
|
||||
}
|
||||
class N {
|
||||
constructor(i: Int): this() {
|
||||
val a = 1
|
||||
}
|
||||
|
||||
constructor() {
|
||||
}
|
||||
}
|
||||
class O<T>(i: T) {
|
||||
constructor(i: Int, j: T): this(j) {
|
||||
}
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
LineBreakpoint created at smartStepIntoConstructor.kt:7
|
||||
LineBreakpoint created at smartStepIntoConstructor.kt:11
|
||||
LineBreakpoint created at smartStepIntoConstructor.kt:15
|
||||
LineBreakpoint created at smartStepIntoConstructor.kt:19
|
||||
LineBreakpoint created at smartStepIntoConstructor.kt:23
|
||||
LineBreakpoint created at smartStepIntoConstructor.kt:27
|
||||
LineBreakpoint created at smartStepIntoConstructor.kt:31
|
||||
LineBreakpoint created at smartStepIntoConstructor.kt:35
|
||||
LineBreakpoint created at smartStepIntoConstructor.kt:39
|
||||
LineBreakpoint created at smartStepIntoConstructor.kt:43
|
||||
LineBreakpoint created at smartStepIntoConstructor.kt:47
|
||||
LineBreakpoint created at smartStepIntoConstructor.kt:51
|
||||
LineBreakpoint created at smartStepIntoConstructor.kt:55
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
smartStepIntoConstructor.kt:7
|
||||
smartStepIntoConstructor.kt:59
|
||||
smartStepIntoConstructor.kt:11
|
||||
smartStepIntoConstructor.kt:60
|
||||
smartStepIntoConstructor.kt:15
|
||||
smartStepIntoConstructor.kt:62
|
||||
smartStepIntoConstructor.kt:19
|
||||
smartStepIntoConstructor.kt:65
|
||||
smartStepIntoConstructor.kt:23
|
||||
smartStepIntoConstructor.kt:69
|
||||
smartStepIntoConstructor.kt:27
|
||||
smartStepIntoConstructor.kt:74
|
||||
smartStepIntoConstructor.kt:31
|
||||
smartStepIntoConstructor.kt:77
|
||||
smartStepIntoConstructor.kt:35
|
||||
smartStepIntoConstructor.kt:82
|
||||
smartStepIntoConstructor.kt:39
|
||||
smartStepIntoConstructor.kt:89
|
||||
smartStepIntoConstructor.kt:43
|
||||
smartStepIntoConstructor.kt:97
|
||||
smartStepIntoConstructor.kt:47
|
||||
smartStepIntoConstructor.kt:105
|
||||
smartStepIntoConstructor.kt:51
|
||||
smartStepIntoConstructor.kt:112
|
||||
smartStepIntoConstructor.kt:55
|
||||
smartStepIntoConstructor.kt:113
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+33
@@ -0,0 +1,33 @@
|
||||
package smartStepIntoFunWithDefaultArgs
|
||||
|
||||
fun Int.foo(a: Int = 1) {
|
||||
val a = 1
|
||||
}
|
||||
|
||||
fun Int.foo(a: String, b: Int = 1) {
|
||||
val a = 1
|
||||
}
|
||||
|
||||
fun bar() = 1
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
// SMART_STEP_INTO_BY_INDEX: 2
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
bar().foo(2)
|
||||
|
||||
// SMART_STEP_INTO_BY_INDEX: 2
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
bar().foo()
|
||||
|
||||
// SMART_STEP_INTO_BY_INDEX: 2
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
bar().foo("1", 2)
|
||||
|
||||
// SMART_STEP_INTO_BY_INDEX: 2
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
bar().foo("1")
|
||||
}
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
LineBreakpoint created at smartStepIntoFunWithDefaultArgs.kt:17
|
||||
LineBreakpoint created at smartStepIntoFunWithDefaultArgs.kt:22
|
||||
LineBreakpoint created at smartStepIntoFunWithDefaultArgs.kt:27
|
||||
LineBreakpoint created at smartStepIntoFunWithDefaultArgs.kt:32
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
smartStepIntoFunWithDefaultArgs.kt:17
|
||||
smartStepIntoFunWithDefaultArgs.kt:4
|
||||
smartStepIntoFunWithDefaultArgs.kt:22
|
||||
smartStepIntoFunWithDefaultArgs.kt:4
|
||||
smartStepIntoFunWithDefaultArgs.kt:27
|
||||
smartStepIntoFunWithDefaultArgs.kt:8
|
||||
smartStepIntoFunWithDefaultArgs.kt:32
|
||||
smartStepIntoFunWithDefaultArgs.kt:8
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+49
@@ -0,0 +1,49 @@
|
||||
package smartStepIntoInlinedFunLiteral
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val array = arrayOf(1, 2)
|
||||
//Breakpoint!
|
||||
val myClass = MyClass()
|
||||
|
||||
// STEP_OVER: 1
|
||||
// SMART_STEP_INTO_BY_INDEX: 4
|
||||
// smart step into f2.invoke(), one-line lambda
|
||||
myClass.f1 { test() }
|
||||
.f2 { test() }
|
||||
|
||||
// STEP_OVER: 1
|
||||
// SMART_STEP_INTO_BY_INDEX: 2
|
||||
// smart step into map.invoke(), multiline lambda
|
||||
array.map {
|
||||
it *2
|
||||
}
|
||||
|
||||
// STEP_OVER: 1
|
||||
// SMART_STEP_INTO_BY_INDEX: 4
|
||||
// smart step into filter.invoke()
|
||||
array.map { it * 2 }
|
||||
.filter {
|
||||
it > 2
|
||||
}
|
||||
|
||||
// STEP_OVER: 1
|
||||
// SMART_STEP_INTO_BY_INDEX: 4
|
||||
// smart step into f2.invoke(), one-line lambda
|
||||
myClass.f1 { test() }.f2 { test() }
|
||||
}
|
||||
|
||||
class MyClass {
|
||||
inline fun f1(f1Param: () -> Unit): MyClass {
|
||||
test()
|
||||
f1Param()
|
||||
return this
|
||||
}
|
||||
|
||||
inline fun f2(f1Param: () -> Unit): MyClass {
|
||||
test()
|
||||
f1Param()
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at smartStepIntoInlinedFunLiteral.kt:6
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
smartStepIntoInlinedFunLiteral.kt:6
|
||||
smartStepIntoInlinedFunLiteral.kt:11
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
package smartStepIntoInlinedFunctionalExpression
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val array = arrayOf(1, 2)
|
||||
//Breakpoint!
|
||||
val myClass = MyClass()
|
||||
|
||||
// STEP_OVER: 1
|
||||
// SMART_STEP_INTO_BY_INDEX: 4
|
||||
// smart step into f2.invoke(), one-line lambda
|
||||
myClass.f1(fun () { test() })
|
||||
.f2(fun () { test() })
|
||||
|
||||
// STEP_OVER: 1
|
||||
// SMART_STEP_INTO_BY_INDEX: 2
|
||||
// smart step into map.invoke(), multiline lambda
|
||||
array.map(fun (it): Int {
|
||||
return it * 2
|
||||
})
|
||||
|
||||
// STEP_OVER: 1
|
||||
// SMART_STEP_INTO_BY_INDEX: 4
|
||||
// smart step into filter.invoke()
|
||||
array.map(fun (it): Int { return it * 2 })
|
||||
.filter(fun (it): Boolean {
|
||||
return it > 2
|
||||
})
|
||||
|
||||
// STEP_OVER: 1
|
||||
// SMART_STEP_INTO_BY_INDEX: 2
|
||||
myClass.f3(fun () = myClass.f3 {
|
||||
val a = 1
|
||||
})
|
||||
}
|
||||
|
||||
class MyClass {
|
||||
inline fun f1(f1Param: () -> Unit): MyClass {
|
||||
test()
|
||||
f1Param()
|
||||
return this
|
||||
}
|
||||
|
||||
inline fun f2(f1Param: () -> Unit): MyClass {
|
||||
test()
|
||||
f1Param()
|
||||
return this
|
||||
}
|
||||
|
||||
inline fun f3(f1Param: () -> Unit): Unit {
|
||||
test()
|
||||
f1Param()
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at smartStepIntoInlinedFunctionalExpression.kt:6
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
smartStepIntoInlinedFunctionalExpression.kt:6
|
||||
smartStepIntoInlinedFunctionalExpression.kt:11
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package smartStepIntoInsideLambda
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
//Breakpoint! (lambdaOrdinal = 1)
|
||||
foo { bar() }
|
||||
}
|
||||
|
||||
fun foo(f: () -> Unit) {
|
||||
f()
|
||||
}
|
||||
|
||||
fun bar() {
|
||||
val a = 1
|
||||
}
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at smartStepIntoInsideLambda.kt:6 lambdaOrdinal = 1
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
smartStepIntoInsideLambda.kt:6
|
||||
smartStepIntoInsideLambda.kt:14
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
// KT-13485
|
||||
package smartStepIntoInterfaceFun
|
||||
|
||||
interface ObjectFace<T> {
|
||||
fun act()
|
||||
fun act2(t: T)
|
||||
}
|
||||
|
||||
class ObjectClass : ObjectFace<Int> {
|
||||
override fun act() {
|
||||
println()
|
||||
}
|
||||
override fun act2(t: Int) {
|
||||
println()
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val simple: ObjectFace<Int> = ObjectClass()
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
simple.act()
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
simple.act2(1)
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
LineBreakpoint created at smartStepIntoInterfaceFun.kt:23
|
||||
LineBreakpoint created at smartStepIntoInterfaceFun.kt:27
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
smartStepIntoInterfaceFun.kt:23
|
||||
smartStepIntoInterfaceFun.kt:11
|
||||
smartStepIntoInterfaceFun.kt:27
|
||||
smartStepIntoInterfaceFun.kt:14
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
|
||||
+155
@@ -0,0 +1,155 @@
|
||||
package smartStepIntoInterfaceImpl
|
||||
|
||||
import forTests.MyJavaClass
|
||||
|
||||
interface I {
|
||||
// without params
|
||||
fun foo() {
|
||||
val a = 1
|
||||
}
|
||||
|
||||
// default param
|
||||
fun foo(a: Int, b: Int = 1) {
|
||||
val a = 1
|
||||
}
|
||||
|
||||
// checkParamNotNull
|
||||
fun foo(a: String) {
|
||||
val a = 1
|
||||
}
|
||||
|
||||
fun fooOverride() {
|
||||
val a = 1
|
||||
}
|
||||
|
||||
fun staticCallInOverride(s: String) = 1
|
||||
}
|
||||
|
||||
class IImpl: I {
|
||||
// super call in override (step into doesn't work)
|
||||
override fun fooOverride() {
|
||||
return super.fooOverride()
|
||||
}
|
||||
|
||||
// java static call
|
||||
fun staticCall(s: String): Int {
|
||||
return MyJavaClass.staticFun(s)
|
||||
}
|
||||
|
||||
// java static call in override
|
||||
override fun staticCallInOverride(s: String): Int {
|
||||
return MyJavaClass.staticFun(s)
|
||||
}
|
||||
}
|
||||
|
||||
class IImpl2: I {
|
||||
// java static call in override with this param (step into doesn't work)
|
||||
override fun staticCallInOverride(s: String): Int {
|
||||
return MyJavaClass.staticFun(this)
|
||||
}
|
||||
}
|
||||
|
||||
object Obj: I {
|
||||
@JvmStatic private fun staticFun(s: String): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
// kotlin static call
|
||||
fun staticCall(s: String): Int {
|
||||
return staticFun(s)
|
||||
}
|
||||
|
||||
// kotlin static call in override
|
||||
override fun staticCallInOverride(s: String): Int {
|
||||
return staticFun(s)
|
||||
}
|
||||
}
|
||||
|
||||
object Obj2: I {
|
||||
@JvmStatic private fun staticFun(s: Obj2): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
// kotlin static call in override with this param (step into doesn't work)
|
||||
override fun staticCallInOverride(s: String): Int {
|
||||
return staticFun(this)
|
||||
}
|
||||
}
|
||||
|
||||
fun barI() = IImpl()
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
testSmartStepInto()
|
||||
testStepInto()
|
||||
}
|
||||
|
||||
fun testSmartStepInto() {
|
||||
// TODO First time - doesn't work: should be smartStepIntoInterfaceImpl.kt:8 between smartStepIntoInterfaceImpl.kt:90 and 95
|
||||
// SMART_STEP_INTO_BY_INDEX: 2
|
||||
//Breakpoint!
|
||||
barI().foo()
|
||||
|
||||
// SMART_STEP_INTO_BY_INDEX: 2
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
barI().foo()
|
||||
|
||||
// SMART_STEP_INTO_BY_INDEX: 2
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
barI().foo(1)
|
||||
|
||||
// SMART_STEP_INTO_BY_INDEX: 2
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
barI().foo(1, 2)
|
||||
|
||||
// SMART_STEP_INTO_BY_INDEX: 2
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
barI().foo("a")
|
||||
}
|
||||
|
||||
fun testStepInto() {
|
||||
val ii = IImpl()
|
||||
|
||||
// TODO: should be smartStepIntoInterfaceImpl.kt:31 instead of smartStepIntoInterfaceImpl.kt:22
|
||||
// STEP_INTO: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
ii.fooOverride()
|
||||
|
||||
// STEP_INTO: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
ii.staticCall("a")
|
||||
|
||||
// STEP_INTO: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
ii.staticCallInOverride("a")
|
||||
|
||||
val ii2 = IImpl2()
|
||||
|
||||
// TODO: should be smartStepIntoInterfaceImpl.kt:48 instead of MyJavaClass.java:16
|
||||
// STEP_INTO: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
ii2.staticCallInOverride("a")
|
||||
|
||||
// STEP_INTO: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
Obj.staticCall("a")
|
||||
|
||||
// STEP_INTO: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
Obj.staticCallInOverride("a")
|
||||
|
||||
// TODO: should be smartStepIntoInterfaceImpl.kt:75 instead of smartStepIntoInterfaceImpl.kt:70
|
||||
// STEP_INTO: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
Obj2.staticCallInOverride("a")
|
||||
}
|
||||
Vendored
+40
@@ -0,0 +1,40 @@
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:90
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:95
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:100
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:105
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:110
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:120
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:125
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:130
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:138
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:143
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:148
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:154
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
smartStepIntoInterfaceImpl.kt:90
|
||||
smartStepIntoInterfaceImpl.kt:95
|
||||
smartStepIntoInterfaceImpl.kt:8
|
||||
smartStepIntoInterfaceImpl.kt:100
|
||||
smartStepIntoInterfaceImpl.kt:13
|
||||
smartStepIntoInterfaceImpl.kt:105
|
||||
smartStepIntoInterfaceImpl.kt:13
|
||||
smartStepIntoInterfaceImpl.kt:110
|
||||
smartStepIntoInterfaceImpl.kt:18
|
||||
smartStepIntoInterfaceImpl.kt:120
|
||||
smartStepIntoInterfaceImpl.kt:22
|
||||
smartStepIntoInterfaceImpl.kt:125
|
||||
smartStepIntoInterfaceImpl.kt:36
|
||||
smartStepIntoInterfaceImpl.kt:130
|
||||
smartStepIntoInterfaceImpl.kt:41
|
||||
smartStepIntoInterfaceImpl.kt:138
|
||||
MyJavaClass.java:17
|
||||
smartStepIntoInterfaceImpl.kt:143
|
||||
smartStepIntoInterfaceImpl.kt:59
|
||||
smartStepIntoInterfaceImpl.kt:148
|
||||
smartStepIntoInterfaceImpl.kt:64
|
||||
smartStepIntoInterfaceImpl.kt:154
|
||||
smartStepIntoInterfaceImpl.kt:70
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package smartStepIntoStoredLambda
|
||||
|
||||
fun foo(a: Any) {}
|
||||
|
||||
fun store(a: () -> Unit): () -> Unit {
|
||||
return a
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
// SMART_STEP_INTO_BY_INDEX: 2
|
||||
//Breakpoint!
|
||||
val some = store() {
|
||||
foo("hi")
|
||||
}
|
||||
|
||||
some()
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at smartStepIntoStoredLambda.kt:12
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
smartStepIntoStoredLambda.kt:12
|
||||
smartStepIntoStoredLambda.kt:16
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package smartStepIntoSubClass
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val x: Base = Impl()
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
//Breakpoint!
|
||||
x.foo(args.toString())
|
||||
}
|
||||
|
||||
open class Base {
|
||||
open fun foo(s: String) {
|
||||
val a = 1
|
||||
}
|
||||
}
|
||||
|
||||
class Impl: Base() {
|
||||
override fun foo(s: String) {
|
||||
val b = 1
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at smartStepIntoSubClass.kt:7
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
smartStepIntoSubClass.kt:7
|
||||
smartStepIntoSubClass.kt:18
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+63
@@ -0,0 +1,63 @@
|
||||
package smartStepIntoToLambdaParameter
|
||||
|
||||
fun nonDefaultParameter(paramFun: (Int) -> Int) {
|
||||
// SMART_STEP_INTO_BY_INDEX: 0
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
paramFun(1)
|
||||
}
|
||||
|
||||
fun defaultParameter(f: (String) -> Int = { it.toInt() }) {
|
||||
// SMART_STEP_INTO_BY_INDEX: 0
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
f("12")
|
||||
}
|
||||
|
||||
// Minor bug is here. During selection paramFun() is shown as a target, but f is called instead.
|
||||
fun firstInvokeIsCalled(f: (String) -> Int = { it.toInt() }, paramFun: (Int) -> Int) {
|
||||
// SMART_STEP_INTO_BY_INDEX: 0
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
paramFun(f("12")) + ii()
|
||||
}
|
||||
|
||||
fun nonDefaultWithAnonymousFun(paramFun: (Int) -> Int) {
|
||||
// SMART_STEP_INTO_BY_INDEX: 0
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
paramFun(12)
|
||||
}
|
||||
|
||||
fun withExtensionParameters(paramFun: Int.() -> Int) {
|
||||
// SMART_STEP_INTO_BY_INDEX: 0
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
12.paramFun()
|
||||
}
|
||||
|
||||
fun <T> genericSignatureAndExtensionArgument(v: T, paramFun: (T) -> T) {
|
||||
// SMART_STEP_INTO_BY_INDEX: 0
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
paramFun(v)
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val localFun: (Int) -> Int = { it + 1 }
|
||||
|
||||
nonDefaultParameter(localFun)
|
||||
|
||||
defaultParameter()
|
||||
|
||||
firstInvokeIsCalled { it + 1 }
|
||||
|
||||
nonDefaultWithAnonymousFun(fun (i: Int): Int { return i })
|
||||
|
||||
withExtensionParameters { this }
|
||||
|
||||
val ext: Int.() -> Int = { this }
|
||||
genericSignatureAndExtensionArgument(15, ext)
|
||||
}
|
||||
|
||||
fun ii() = 12
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
LineBreakpoint created at smartStepIntoToLambdaParameter.kt:7
|
||||
LineBreakpoint created at smartStepIntoToLambdaParameter.kt:14
|
||||
LineBreakpoint created at smartStepIntoToLambdaParameter.kt:22
|
||||
LineBreakpoint created at smartStepIntoToLambdaParameter.kt:29
|
||||
LineBreakpoint created at smartStepIntoToLambdaParameter.kt:36
|
||||
LineBreakpoint created at smartStepIntoToLambdaParameter.kt:43
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
smartStepIntoToLambdaParameter.kt:7
|
||||
smartStepIntoToLambdaParameter.kt:47
|
||||
smartStepIntoToLambdaParameter.kt:14
|
||||
smartStepIntoToLambdaParameter.kt:10
|
||||
smartStepIntoToLambdaParameter.kt:22
|
||||
smartStepIntoToLambdaParameter.kt:18
|
||||
smartStepIntoToLambdaParameter.kt:29
|
||||
smartStepIntoToLambdaParameter.kt:55
|
||||
smartStepIntoToLambdaParameter.kt:36
|
||||
smartStepIntoToLambdaParameter.kt:57
|
||||
smartStepIntoToLambdaParameter.kt:43
|
||||
smartStepIntoToLambdaParameter.kt:59
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
package smartStepIntoWithDelegates
|
||||
|
||||
interface A {
|
||||
fun foo(): String
|
||||
}
|
||||
|
||||
class AA : A {
|
||||
override fun foo(): String = "AA"
|
||||
}
|
||||
|
||||
class B(a: A) : A by a {
|
||||
override fun foo(): String = "B"
|
||||
}
|
||||
|
||||
class C(b: B) : A by b
|
||||
|
||||
class D(a: A) : A by a
|
||||
|
||||
fun test1() {
|
||||
val c: C = C(B(AA()))
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
c.foo() // 12
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
val a: A = C(B(AA()))
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
a.foo() // 12
|
||||
}
|
||||
|
||||
fun test3() {
|
||||
val d: D = D(AA())
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
d.foo() // 8
|
||||
}
|
||||
|
||||
fun test4() {
|
||||
val aa: A = AA()
|
||||
val c: B = B(AA())
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
aa.foo() + c.foo() // 8
|
||||
}
|
||||
|
||||
fun test5() {
|
||||
val aa: A = AA()
|
||||
val c: B = B(AA())
|
||||
// SMART_STEP_INTO_BY_INDEX: 2
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
aa.foo() + c.foo() // 12 (Shouldn't stop at B.foo() even it's evaluated before C.foo())
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
test1()
|
||||
test2()
|
||||
test3()
|
||||
test4()
|
||||
test5()
|
||||
}
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
LineBreakpoint created at smartStepIntoWithDelegates.kt:24
|
||||
LineBreakpoint created at smartStepIntoWithDelegates.kt:32
|
||||
LineBreakpoint created at smartStepIntoWithDelegates.kt:40
|
||||
LineBreakpoint created at smartStepIntoWithDelegates.kt:49
|
||||
LineBreakpoint created at smartStepIntoWithDelegates.kt:58
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
smartStepIntoWithDelegates.kt:24
|
||||
smartStepIntoWithDelegates.kt:12
|
||||
smartStepIntoWithDelegates.kt:32
|
||||
smartStepIntoWithDelegates.kt:12
|
||||
smartStepIntoWithDelegates.kt:40
|
||||
smartStepIntoWithDelegates.kt:8
|
||||
smartStepIntoWithDelegates.kt:49
|
||||
smartStepIntoWithDelegates.kt:8
|
||||
smartStepIntoWithDelegates.kt:58
|
||||
smartStepIntoWithDelegates.kt:12
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
package smartStepIntoWithOverrides
|
||||
|
||||
abstract class A {
|
||||
abstract fun foo(): String
|
||||
}
|
||||
|
||||
open class B : A() {
|
||||
override fun foo(): String = "B"
|
||||
}
|
||||
|
||||
open class C : B() {
|
||||
override fun foo(): String = "C"
|
||||
}
|
||||
|
||||
class D : C()
|
||||
|
||||
fun test1() {
|
||||
val d: D = D()
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
d.foo() // 12
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
val a: A = B()
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
a.foo() // 8
|
||||
}
|
||||
|
||||
fun test3() {
|
||||
val a: A = C()
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
a.foo() // 12
|
||||
}
|
||||
|
||||
fun test4() {
|
||||
val a: A = B()
|
||||
val d: D = D()
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
a.foo() + d.foo() // 8
|
||||
}
|
||||
|
||||
fun test5() {
|
||||
val a: A = B()
|
||||
val d: D = D()
|
||||
// SMART_STEP_INTO_BY_INDEX: 2
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
a.foo() + d.foo() // 12 (Shouldn't stop at B.foo() even it's evaluated before C.foo())
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
test1()
|
||||
test2()
|
||||
test3()
|
||||
test4()
|
||||
test5()
|
||||
}
|
||||
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
LineBreakpoint created at smartStepIntoWithOverrides.kt:22
|
||||
LineBreakpoint created at smartStepIntoWithOverrides.kt:30
|
||||
LineBreakpoint created at smartStepIntoWithOverrides.kt:38
|
||||
LineBreakpoint created at smartStepIntoWithOverrides.kt:47
|
||||
LineBreakpoint created at smartStepIntoWithOverrides.kt:56
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
smartStepIntoWithOverrides.kt:22
|
||||
smartStepIntoWithOverrides.kt:12
|
||||
smartStepIntoWithOverrides.kt:30
|
||||
smartStepIntoWithOverrides.kt:8
|
||||
smartStepIntoWithOverrides.kt:38
|
||||
smartStepIntoWithOverrides.kt:12
|
||||
smartStepIntoWithOverrides.kt:47
|
||||
smartStepIntoWithOverrides.kt:8
|
||||
smartStepIntoWithOverrides.kt:56
|
||||
smartStepIntoWithOverrides.kt:12
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
package stepIntoStdlibInlineFun2step
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
customLib.functionInLibrary.simpleFun()
|
||||
}
|
||||
|
||||
// ADDITIONAL_BREAKPOINT: functionInLibrary.kt:public inline fun simpleFun()
|
||||
// STEP_INTO: 5
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
LineBreakpoint created at functionInLibrary.kt:4
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
functionInLibrary.kt:4
|
||||
functionInLibrary.kt:8
|
||||
functionInLibrary.kt:9
|
||||
functionInLibrary.kt:5
|
||||
stepIntoStdlibInlineFun2step.kt:5
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
package stepOutInlineFunctionStdlib
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val a = listOf(1, 2, 3)
|
||||
//Breakpoint!
|
||||
a.firstOrNull {
|
||||
it > 1
|
||||
}
|
||||
}
|
||||
|
||||
fun test(i: Int) = 1
|
||||
|
||||
// TRACING_FILTERS_ENABLED: false
|
||||
// STEP_INTO: 1
|
||||
// STEP_OUT: 1
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at stepOutInlineFunctionStdlib.kt:6
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
stepOutInlineFunctionStdlib.kt:6
|
||||
stepOutInlineFunctionStdlib.kt:1
|
||||
Thread.!EXT!
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+56
@@ -0,0 +1,56 @@
|
||||
package stepOverNonLocalReturnInLambda
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
try {
|
||||
test1()
|
||||
test2()
|
||||
test3()
|
||||
}
|
||||
catch(e: Exception) {
|
||||
val a = 1
|
||||
}
|
||||
|
||||
val c = 1
|
||||
}
|
||||
|
||||
fun test1() {
|
||||
// STEP_OVER: 2
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
val a = "aaa"
|
||||
synchronized(a) {
|
||||
if (a == "bbb") {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
val c = 1
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
// STEP_OVER: 2
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
val a = "aaa"
|
||||
synchronized(a) {
|
||||
if (a == "aaa") {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
val c = 1
|
||||
}
|
||||
|
||||
private fun test3() {
|
||||
inlineFunThrowException()
|
||||
}
|
||||
|
||||
inline fun inlineFunThrowException() {
|
||||
// STEP_OVER: 2
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
val a = 1
|
||||
synchronized(a) {
|
||||
throw IllegalArgumentException()
|
||||
}
|
||||
}
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
LineBreakpoint created at stepOverNonLocalReturnInLambda.kt:20
|
||||
LineBreakpoint created at stepOverNonLocalReturnInLambda.kt:34
|
||||
LineBreakpoint created at stepOverNonLocalReturnInLambda.kt:52
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
stepOverNonLocalReturnInLambda.kt:20
|
||||
stepOverNonLocalReturnInLambda.kt:21
|
||||
stepOverNonLocalReturnInLambda.kt:27
|
||||
stepOverNonLocalReturnInLambda.kt:34
|
||||
stepOverNonLocalReturnInLambda.kt:35
|
||||
stepOverNonLocalReturnInLambda.kt:7
|
||||
stepOverNonLocalReturnInLambda.kt:52
|
||||
stepOverNonLocalReturnInLambda.kt:53
|
||||
stepOverNonLocalReturnInLambda.kt:9
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
package syntheticProvider
|
||||
|
||||
interface I {
|
||||
fun manyInts(i: Int, i2: Int, i3: Int, i4: Int): Int {
|
||||
return i
|
||||
}
|
||||
|
||||
fun manyLongs(i: Long, i2: Long, i3: Long, i4: Long): Long {
|
||||
return i
|
||||
}
|
||||
|
||||
fun manyDouble(i: Double, i2: Double, i3: Double, i4: Double): Double {
|
||||
return i
|
||||
}
|
||||
|
||||
fun manyFloat(i: Float, i2: Float, i3: Float, i4: Float): Float {
|
||||
return i
|
||||
}
|
||||
|
||||
fun manyObject(i: Any, i2: Any, i3: Any, i4: Any): Any {
|
||||
return i
|
||||
}
|
||||
|
||||
fun void() {
|
||||
val a = 1
|
||||
}
|
||||
}
|
||||
|
||||
class IImpl: I
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val i = IImpl()
|
||||
i.manyInts(1, 1, 1, 1)
|
||||
|
||||
// STEP_INTO: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
i.manyInts(1, 1, 1, 1)
|
||||
// STEP_INTO: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
i.manyLongs(1, 1, 1, 1)
|
||||
// STEP_INTO: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
i.manyDouble(1.0, 1.0, 1.0, 1.0)
|
||||
// STEP_INTO: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
i.manyFloat(1.0f, 1.0f, 1.0f, 1.0f)
|
||||
// STEP_INTO: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
i.manyObject(1, 1, 1, 1)
|
||||
// STEP_INTO: 1
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
i.void()
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
LineBreakpoint created at syntheticProvider.kt:38
|
||||
LineBreakpoint created at syntheticProvider.kt:42
|
||||
LineBreakpoint created at syntheticProvider.kt:46
|
||||
LineBreakpoint created at syntheticProvider.kt:50
|
||||
LineBreakpoint created at syntheticProvider.kt:54
|
||||
LineBreakpoint created at syntheticProvider.kt:58
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
syntheticProvider.kt:38
|
||||
syntheticProvider.kt:5
|
||||
syntheticProvider.kt:42
|
||||
syntheticProvider.kt:9
|
||||
syntheticProvider.kt:46
|
||||
syntheticProvider.kt:13
|
||||
syntheticProvider.kt:50
|
||||
syntheticProvider.kt:17
|
||||
syntheticProvider.kt:54
|
||||
syntheticProvider.kt:21
|
||||
syntheticProvider.kt:58
|
||||
syntheticProvider.kt:25
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Reference in New Issue
Block a user