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,36 @@
package capturedValues1
fun main(args: Array<String>) {
1000.foo(args)
}
fun Int.foo(args: Array<String>) {
val a = 1
block {
val b = 2
val b2 = 2
block("x") place1@ {
val c = 3
val c2 = 3
block("y") place2@ {
//Breakpoint!
this@place1
this@foo
b
c2
args
}
}
}
}
fun block(block: () -> Unit) {
block()
}
fun <T> block(obj: T, block: T.() -> Unit) {
obj.block()
}
// SHOW_KOTLIN_VARIABLES
// PRINT_FRAME
@@ -0,0 +1,20 @@
LineBreakpoint created at capturedValues1.kt:17
Run Java
Connected to the target VM
capturedValues1.kt:17
frame = invoke:17, CapturedValues1Kt$foo$1$1$1 {capturedValues1}
unknown = this (@place1) = x
field = value: char[] = {char[1]@uniqueID} (sp = String.!EXT!)
element = 0 = 'x' 120
field = hash: int = 0 (sp = String.!EXT!)
unknown = c2 = 3
unknown = b = 2
unknown = this (@foo) = 1000
unknown = args = {java.lang.String[0]@uniqueID}
local = this: java.lang.String = y (sp = null)
field = value: char[] = {char[1]@uniqueID} (sp = String.!EXT!)
element = 0 = 'y' 121
field = hash: int = 0 (sp = String.!EXT!)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,29 @@
package capturedValues2
fun main() {
val a = 1
block {
foo(a)
val a = 2
block {
foo(a)
val a = 3
block {
//Breakpoint!
foo(a)
}
}
}
}
inline fun block(block: () -> Unit) {
block()
}
fun foo(foo: Int) {}
// SHOW_KOTLIN_VARIABLES
// PRINT_FRAME
@@ -0,0 +1,9 @@
LineBreakpoint created at capturedValues2.kt:16
Run Java
Connected to the target VM
capturedValues2.kt:16
frame = main:16, CapturedValues2Kt {capturedValues2}
local = a: int = 3 (sp = capturedValues2.kt, 13)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,14 @@
package catchVariable
fun main(args: Array<String>) {
try {
throw Exception()
}
//Breakpoint!
catch (e: Exception) {
}
}
// PRINT_FRAME
@@ -0,0 +1,9 @@
LineBreakpoint created at catchVariable.kt:9
Run Java
Connected to the target VM
catchVariable.kt:9
frame = main:9, CatchVariableKt {catchVariable}
local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = catchVariable.kt, 3)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,15 @@
package coroutineContextFun
import kotlin.coroutines.coroutineContext
suspend fun main() {
val a = 5
foo()
//Breakpoint!
foo()
}
private suspend fun foo() {}
// EXPRESSION: coroutineContext
// RESULT: instance of kotlin.coroutines.EmptyCoroutineContext(id=ID): Lkotlin/coroutines/EmptyCoroutineContext;
@@ -0,0 +1,8 @@
LineBreakpoint created at coroutineContextFun.kt:9
Run Java
Connected to the target VM
coroutineContextFun.kt:9
Compile bytecode for coroutineContext
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,19 @@
package coroutineContextLambda
import kotlin.coroutines.coroutineContext
suspend fun main() {
foo()
}
private var foo: suspend () -> Unit = {
bar()
}
private var bar: suspend () -> Unit = {
//Breakpoint!
val a = 5
}
// EXPRESSION: coroutineContext
// RESULT: instance of kotlin.coroutines.EmptyCoroutineContext(id=ID): Lkotlin/coroutines/EmptyCoroutineContext;
@@ -0,0 +1,8 @@
LineBreakpoint created at coroutineContextLambda.kt:15
Run Java
Connected to the target VM
coroutineContextLambda.kt:15
Compile bytecode for coroutineContext
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,18 @@
package coroutineContextWithoutSuspend
import kotlin.coroutines.coroutineContext
suspend fun main() {
foo()
}
private suspend fun foo() {
//Breakpoint!
val a = 5
}
// SHOW_KOTLIN_VARIABLES
// PRINT_FRAME
// EXPRESSION: coroutineContext
// RESULT: instance of kotlin.coroutines.EmptyCoroutineContext(id=ID): Lkotlin/coroutines/EmptyCoroutineContext;
@@ -0,0 +1,9 @@
LineBreakpoint created at coroutineContextWithoutSuspend.kt:11
Run Java
Connected to the target VM
coroutineContextWithoutSuspend.kt:11
Compile bytecode for coroutineContext
frame = foo:11, CoroutineContextWithoutSuspendKt {coroutineContextWithoutSuspend}
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,24 @@
package defaultImplsMangling
interface IFoo {
val x: Int
fun foo() {
//Breakpoint!
val a = 5
}
}
class Foo : IFoo {
override val x: Int = 1
}
fun main() {
Foo().foo()
}
// SHOW_KOTLIN_VARIABLES
// PRINT_FRAME
// EXPRESSION: x
// RESULT: 1: I
@@ -0,0 +1,11 @@
LineBreakpoint created at defaultImplsMangling.kt:8
Run Java
Connected to the target VM
defaultImplsMangling.kt:8
Compile bytecode for x
frame = foo:8, IFoo$DefaultImpls {defaultImplsMangling}
local = this: defaultImplsMangling.IFoo = {defaultImplsMangling.Foo@uniqueID} (sp = null)
field = x: int = 1 (sp = defaultImplsMangling.kt, 13)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,29 @@
package delegatedPropertyInClass
import kotlin.properties.Delegates
import kotlin.reflect.KProperty
fun main(args: Array<String>) {
val a = A()
//Breakpoint!
args.size
}
class A {
val prop by MyDelegate()
val propEx by MyDelegateThrowsException()
}
class MyDelegate {
operator fun getValue(t: Any?, p: KProperty<*>): Int = 1
}
class MyDelegateThrowsException {
operator fun getValue(t: Any?, p: KProperty<*>): Int = throw IllegalStateException()
}
// PRINT_FRAME
// RENDER_DELEGATED_PROPERTIES
// SKIP: suppressedExceptions
// SKIP: stackTrace
@@ -0,0 +1,19 @@
LineBreakpoint created at delegatedPropertyInClass.kt:9
Run Java
Connected to the target VM
delegatedPropertyInClass.kt:9
Compile bytecode for args.size
frame = main:9, DelegatedPropertyInClassKt {delegatedPropertyInClass}
local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = delegatedPropertyInClass.kt, 6)
local = a: delegatedPropertyInClass.A = {delegatedPropertyInClass.A@uniqueID} (sp = delegatedPropertyInClass.kt, 7)
field = prop$delegate: delegatedPropertyInClass.MyDelegate = {delegatedPropertyInClass.MyDelegate@uniqueID} (sp = delegatedPropertyInClass.kt, 13)
- Class has no fields
field = prop: int = 1 (sp = delegatedPropertyInClass.kt, 13)
field = propEx$delegate: delegatedPropertyInClass.MyDelegateThrowsException = {delegatedPropertyInClass.MyDelegateThrowsException@uniqueID} (sp = delegatedPropertyInClass.kt, 14)
- Class has no fields
field = propEx: int = {java.lang.IllegalStateException@uniqueID}java.lang.IllegalStateException (sp = delegatedPropertyInClass.kt, 14)
field = detailMessage: java.lang.String = null (sp = Throwable.!EXT!)
field = cause: java.lang.Throwable = {java.lang.IllegalStateException@uniqueID}java.lang.IllegalStateException (sp = Throwable.!EXT!)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,30 @@
package delegatedPropertyInClassKotlinVariables
import kotlin.properties.Delegates
import kotlin.reflect.KProperty
fun main(args: Array<String>) {
val a = A()
//Breakpoint!
args.size
}
class A {
val prop by MyDelegate()
val propEx by MyDelegateThrowsException()
}
class MyDelegate {
operator fun getValue(t: Any?, p: KProperty<*>): Int = 1
}
class MyDelegateThrowsException {
operator fun getValue(t: Any?, p: KProperty<*>): Int = throw IllegalStateException()
}
// SHOW_KOTLIN_VARIABLES
// PRINT_FRAME
// RENDER_DELEGATED_PROPERTIES
// SKIP: suppressedExceptions
// SKIP: stackTrace
@@ -0,0 +1,15 @@
LineBreakpoint created at delegatedPropertyInClassKotlinVariables.kt:9
Run Java
Connected to the target VM
delegatedPropertyInClassKotlinVariables.kt:9
Compile bytecode for args.size
frame = main:9, DelegatedPropertyInClassKotlinVariablesKt {delegatedPropertyInClassKotlinVariables}
local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = delegatedPropertyInClassKotlinVariables.kt, 6)
local = a: delegatedPropertyInClassKotlinVariables.A = {delegatedPropertyInClassKotlinVariables.A@uniqueID} (sp = delegatedPropertyInClassKotlinVariables.kt, 7)
field = prop: int = 1 (sp = delegatedPropertyInClassKotlinVariables.kt, 13)
field = propEx: int = {java.lang.IllegalStateException@uniqueID}java.lang.IllegalStateException (sp = delegatedPropertyInClassKotlinVariables.kt, 14)
field = detailMessage: java.lang.String = null (sp = Throwable.!EXT!)
field = cause: java.lang.Throwable = {java.lang.IllegalStateException@uniqueID}java.lang.IllegalStateException (sp = Throwable.!EXT!)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,22 @@
package delegatedPropertyInClassWithToString
import kotlin.reflect.KProperty
fun main(args: Array<String>) {
val a = A()
//Breakpoint!
args.size
}
class A {
val prop by MyDelegate()
override fun toString(): String = "KotlinTest"
}
class MyDelegate {
operator fun getValue(t: Any?, p: KProperty<*>): Int = 1
}
// PRINT_FRAME
// RENDER_DELEGATED_PROPERTIES
@@ -0,0 +1,14 @@
LineBreakpoint created at delegatedPropertyInClassWithToString.kt:8
Run Java
Connected to the target VM
delegatedPropertyInClassWithToString.kt:8
Compile bytecode for args.size
frame = main:8, DelegatedPropertyInClassWithToStringKt {delegatedPropertyInClassWithToString}
local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = delegatedPropertyInClassWithToString.kt, 5)
local = a: delegatedPropertyInClassWithToString.A = {delegatedPropertyInClassWithToString.A@uniqueID}KotlinTest (sp = delegatedPropertyInClassWithToString.kt, 6)
field = prop$delegate: delegatedPropertyInClassWithToString.MyDelegate = {delegatedPropertyInClassWithToString.MyDelegate@uniqueID} (sp = delegatedPropertyInClassWithToString.kt, 12)
- Class has no fields
field = prop: int = 1 (sp = delegatedPropertyInClassWithToString.kt, 12)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,21 @@
package delegatedPropertyInClassWoRenderer
import kotlin.properties.Delegates
import kotlin.reflect.KProperty
fun main(args: Array<String>) {
val a = A()
//Breakpoint!
args.size
}
class A {
val prop by MyDelegate()
}
class MyDelegate {
operator fun getValue(t: Any?, p: KProperty<*>): Int = 1
}
// RENDER_DELEGATED_PROPERTIES
// PRINT_FRAME
@@ -0,0 +1,14 @@
LineBreakpoint created at delegatedPropertyInClassWoRenderer.kt:9
Run Java
Connected to the target VM
delegatedPropertyInClassWoRenderer.kt:9
Compile bytecode for args.size
frame = main:9, DelegatedPropertyInClassWoRendererKt {delegatedPropertyInClassWoRenderer}
local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = delegatedPropertyInClassWoRenderer.kt, 6)
local = a: delegatedPropertyInClassWoRenderer.A = {delegatedPropertyInClassWoRenderer.A@uniqueID} (sp = delegatedPropertyInClassWoRenderer.kt, 7)
field = prop$delegate: delegatedPropertyInClassWoRenderer.MyDelegate = {delegatedPropertyInClassWoRenderer.MyDelegate@uniqueID} (sp = delegatedPropertyInClassWoRenderer.kt, 13)
- Class has no fields
field = prop: int = 1 (sp = delegatedPropertyInClassWoRenderer.kt, 13)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,23 @@
package frameAnonymousObject
fun main(args: Array<String>) {
val val1 = 1
val o = object {
val obProp = 1
fun run() {
foo {
//Breakpoint!
val1 + obProp
}
}
}
o.run()
}
fun foo(f: () -> Unit) {
f()
}
// PRINT_FRAME
@@ -0,0 +1,13 @@
LineBreakpoint created at frameAnonymousObject.kt:11
Run Java
Connected to the target VM
frameAnonymousObject.kt:11
frame = invoke:11, FrameAnonymousObjectKt$main$o$1$run$1 {frameAnonymousObject}
this = this = {frameAnonymousObject.FrameAnonymousObjectKt$main$o$1$run$1@uniqueID}Function0<kotlin.Unit>
field = this$0: frameAnonymousObject.FrameAnonymousObjectKt$main$o$1 = {frameAnonymousObject.FrameAnonymousObjectKt$main$o$1@uniqueID} (sp = null)
field = obProp: int = 1 (sp = frameAnonymousObject.kt, 6)
field = $val1: int = 1 (sp = null)
field = arity: int = 0 (sp = Lambda.!EXT!)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,31 @@
package frameClassObject
fun main(args: Array<String>) {
A().test()
}
class A {
companion object {
val prop = 1
fun myFun() = 1
}
fun test() {
foo {
//Breakpoint!
prop
}
}
}
fun foo(f: () -> Unit) {
f()
}
// PRINT_FRAME
// EXPRESSION: prop
// RESULT: 1: I
// EXPRESSION: myFun()
// RESULT: 1: I
@@ -0,0 +1,12 @@
LineBreakpoint created at frameClassObject.kt:16
Run Java
Connected to the target VM
frameClassObject.kt:16
Compile bytecode for prop
Compile bytecode for myFun()
frame = invoke:16, A$test$1 {frameClassObject}
this = this = {frameClassObject.A$test$1@uniqueID}Function0<kotlin.Unit>
field = arity: int = 0 (sp = Lambda.!EXT!)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,10 @@
package frameClosingBracket
fun main(args: Array<String>) {
val a = 1
//Breakpoint!
}
// PRINT_FRAME
// EXPRESSION: a
// RESULT: 1: I
@@ -0,0 +1,11 @@
LineBreakpoint created at frameClosingBracket.kt:6
Run Java
Connected to the target VM
frameClosingBracket.kt:6
Compile bytecode for a
frame = main:6, FrameClosingBracketKt {frameClosingBracket}
local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = frameClosingBracket.kt, 3)
local = a: int = 1 (sp = frameClosingBracket.kt, 4)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,73 @@
package frameExtFunExtFun
fun main(args: Array<String>) {
Outer().run()
}
class A {
val aProp = 1
fun aMyFun() = 1
}
class Outer {
val outerProp = 1
fun outerMyFun() = 1
fun A.foo() {
val valFoo = 1
class LocalClass {
val lcProp = 1
fun B.test() {
val valTest = 1
lambda {
//Breakpoint!
outerProp + aProp + lcProp + bProp + valFoo + valTest
}
}
fun run() {
B().test()
}
}
LocalClass().run()
}
fun run() {
A().foo()
}
}
class B {
val bProp = 1
fun bMyFun() = 1
}
fun lambda(f: () -> Unit) {
f()
}
// PRINT_FRAME
// EXPRESSION: valFoo
// RESULT: 1: I
// EXPRESSION: valTest
// RESULT: 1: I
// EXPRESSION: aProp
// RESULT: 1: I
// EXPRESSION: outerProp
// RESULT: 1: I
// EXPRESSION: bProp
// RESULT: 1: I
// EXPRESSION: aMyFun()
// RESULT: 1: I
// EXPRESSION: outerMyFun()
// RESULT: 1: I
// EXPRESSION: bMyFun()
// RESULT: 1: I
@@ -0,0 +1,28 @@
LineBreakpoint created at frameExtFunExtFun.kt:24
Run Java
Connected to the target VM
frameExtFunExtFun.kt:24
Compile bytecode for valFoo
Compile bytecode for valTest
Compile bytecode for aProp
Compile bytecode for outerProp
Compile bytecode for bProp
Compile bytecode for aMyFun()
Compile bytecode for outerMyFun()
Compile bytecode for bMyFun()
frame = invoke:24, Outer$foo$LocalClass$test$1 {frameExtFunExtFun}
this = this = {frameExtFunExtFun.Outer$foo$LocalClass$test$1@uniqueID}Function0<kotlin.Unit>
field = this$0: frameExtFunExtFun.Outer$foo$LocalClass = {frameExtFunExtFun.Outer$foo$LocalClass@uniqueID} (sp = null)
field = lcProp: int = 1 (sp = frameExtFunExtFun.kt, 19)
field = this$0: frameExtFunExtFun.Outer = {frameExtFunExtFun.Outer@uniqueID} (sp = null)
field = outerProp: int = 1 (sp = frameExtFunExtFun.kt, 13)
field = $this_foo: frameExtFunExtFun.A = {frameExtFunExtFun.A@uniqueID} (sp = null)
field = aProp: int = 1 (sp = frameExtFunExtFun.kt, 8)
field = $valFoo: int = 1 (sp = null)
field = $this_test: frameExtFunExtFun.B = {frameExtFunExtFun.B@uniqueID} (sp = null)
field = bProp: int = 1 (sp = frameExtFunExtFun.kt, 41)
field = $valTest: int = 1 (sp = null)
field = arity: int = 0 (sp = Lambda.!EXT!)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,23 @@
package frameExtensionFun
fun main(args: Array<String>) {
A().foo()
}
class A {
val prop = 1
fun myFun() = 1
}
fun A.foo() {
//Breakpoint!
prop
}
// PRINT_FRAME
// EXPRESSION: prop
// RESULT: 1: I
// EXPRESSION: myFun()
// RESULT: 1: I
@@ -0,0 +1,12 @@
LineBreakpoint created at frameExtensionFun.kt:14
Run Java
Connected to the target VM
frameExtensionFun.kt:14
Compile bytecode for prop
Compile bytecode for myFun()
frame = foo:14, FrameExtensionFunKt {frameExtensionFun}
local = $this$foo: frameExtensionFun.A = {frameExtensionFun.A@uniqueID} (sp = null)
field = prop: int = 1 (sp = frameExtensionFun.kt, 8)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,24 @@
package frameInlineArgument
fun main(args: Array<String>) {
val element = 1
A().inlineFun {
//Breakpoint!
element
}
}
class A {
inline fun inlineFun(s: () -> Unit) {
val element = 1.0
s()
}
val prop = 1
}
// PRINT_FRAME
// EXPRESSION: element
// RESULT: 1: I
@@ -0,0 +1,16 @@
LineBreakpoint created at frameInlineArgument.kt:7
Run Java
Connected to the target VM
frameInlineArgument.kt:7
Compile bytecode for element
frame = main:7, FrameInlineArgumentKt {frameInlineArgument}
local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = frameInlineArgument.kt, 3)
local = element: int = 1 (sp = frameInlineArgument.kt, 4)
local = this_$iv: frameInlineArgument.A = {frameInlineArgument.A@uniqueID} (sp = null)
field = prop: int = 1 (sp = frameInlineArgument.kt, 17)
local = $i$f$inlineFun: int = undefined (sp = null)
local = element$iv: double = 1.0 (sp = frameInlineArgument.kt, 4)
local = $i$a$-inlineFun-FrameInlineArgumentKt$main$1: int = undefined (sp = null)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,38 @@
// KT-10674: Debugger: Evaluate Expression / Watches fail for variable/parameter captured from one inline function to another
package frameInlineArgumentInsideInlineFun
class A {
inline fun inlineFun(s: (Int) -> Unit) {
val element = 1.0
s(1)
}
}
class B {
inline fun foo(s: (Int) -> Unit) {
val element = 1
A().inlineFun {
//Breakpoint!
val e = element
}
s(1)
}
}
class C {
fun bar() {
val element = 1f
B().foo {
val e = element
}
}
}
fun main(args: Array<String>) {
C().bar()
}
// PRINT_FRAME
// EXPRESSION: element
// RESULT: 1: I
@@ -0,0 +1,22 @@
LineBreakpoint created at frameInlineArgumentInsideInlineFun.kt:16
Run Java
Connected to the target VM
frameInlineArgumentInsideInlineFun.kt:16
Compile bytecode for element
frame = bar:16, C {frameInlineArgumentInsideInlineFun}
this = this = {frameInlineArgumentInsideInlineFun.C@uniqueID}
- Class has no fields
local = element: float = 1.0 (sp = frameInlineArgumentInsideInlineFun.kt, 13)
local = this_$iv: frameInlineArgumentInsideInlineFun.B = {frameInlineArgumentInsideInlineFun.B@uniqueID} (sp = null)
- Class has no fields
local = $i$f$foo: int = undefined (sp = null)
local = element$iv: int = 1 (sp = frameInlineArgumentInsideInlineFun.kt, 13)
local = this_$iv$iv: frameInlineArgumentInsideInlineFun.A = {frameInlineArgumentInsideInlineFun.A@uniqueID} (sp = null)
- Class has no fields
local = $i$f$inlineFun: int = undefined (sp = null)
local = element$iv$iv: double = 1.0 (sp = frameInlineArgumentInsideInlineFun.kt, 13)
local = it$iv: int = 1 (sp = null)
local = $i$a$-inlineFun-B$foo$1$iv: int = undefined (sp = null)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,27 @@
package frameInlineFun
fun main(args: Array<String>) {
val element = 1
A().inlineFun {
element
}
}
class A {
inline fun inlineFun(s: (Int) -> Unit) {
val element = 1.0
//Breakpoint!
s(1)
}
val prop = 1
}
// PRINT_FRAME
// EXPRESSION: element
// RESULT: 1.0: D
// EXPRESSION: this.prop
// RESULT: 1: I
@@ -0,0 +1,16 @@
LineBreakpoint created at frameInlineFun.kt:14
Run Java
Connected to the target VM
frameInlineFun.kt:14
Compile bytecode for element
Compile bytecode for this.prop
frame = main:14, FrameInlineFunKt {frameInlineFun}
local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = null)
local = element: int = 1 (sp = frameInlineFun.kt, 12)
local = this_$iv: frameInlineFun.A = {frameInlineFun.A@uniqueID} (sp = null)
field = prop: int = 1 (sp = frameInlineFun.kt, 17)
local = $i$f$inlineFun: int = undefined (sp = null)
local = element$iv: double = 1.0 (sp = frameInlineFun.kt, 12)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,46 @@
package frameInlineFunCallInsideInlineFun
class A {
inline fun inlineFun(s: (Int) -> Unit) {
val element = 1.0
s(1)
}
val prop = 1
}
class B {
inline fun foo(s: (Int) -> Unit) {
val element = 2
val a = A()
// STEP_INTO: 1
// STEP_OVER: 1
//Breakpoint!
a.inlineFun {
val e = element
}
s(1)
}
}
class C {
fun bar() {
val element = 1f
B().foo {
val e = element
}
}
}
fun main(args: Array<String>) {
C().bar()
}
// PRINT_FRAME
// EXPRESSION: element
// RESULT: 1.0: D
// EXPRESSION: this.prop
// RESULT: 1: I
@@ -0,0 +1,25 @@
LineBreakpoint created at frameInlineFunCallInsideInlineFun.kt:19
Run Java
Connected to the target VM
frameInlineFunCallInsideInlineFun.kt:19
frameInlineFunCallInsideInlineFun.kt:5
frameInlineFunCallInsideInlineFun.kt:6
Compile bytecode for element
Compile bytecode for this.prop
frame = bar:6, C {frameInlineFunCallInsideInlineFun}
this = this = {frameInlineFunCallInsideInlineFun.C@uniqueID}
- Class has no fields
local = element: float = 1.0 (sp = frameInlineFunCallInsideInlineFun.kt, 5)
local = this_$iv: frameInlineFunCallInsideInlineFun.B = {frameInlineFunCallInsideInlineFun.B@uniqueID} (sp = null)
- Class has no fields
local = $i$f$foo: int = undefined (sp = null)
local = element$iv: int = 2 (sp = frameInlineFunCallInsideInlineFun.kt, 5)
local = a$iv: frameInlineFunCallInsideInlineFun.A = {frameInlineFunCallInsideInlineFun.A@uniqueID} (sp = null)
field = prop: int = 1 (sp = frameInlineFunCallInsideInlineFun.kt, 9)
local = this_$iv$iv: frameInlineFunCallInsideInlineFun.A = {frameInlineFunCallInsideInlineFun.A@uniqueID} (sp = null)
field = prop: int = 1 (sp = frameInlineFunCallInsideInlineFun.kt, 9)
local = $i$f$inlineFun: int = undefined (sp = null)
local = element$iv$iv: double = 1.0 (sp = frameInlineFunCallInsideInlineFun.kt, 5)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,48 @@
// SHOW_KOTLIN_VARIABLES
package frameInlineFunCallInsideInlineFunKotlinVariables
class A {
inline fun inlineFun(s: (Int) -> Unit) {
val element = 1.0
s(1)
}
val prop = 1
}
class B {
inline fun foo(s: (Int) -> Unit) {
val element = 2
val a = A()
// STEP_INTO: 1
// STEP_OVER: 1
//Breakpoint!
a.inlineFun {
val e = element
}
s(1)
}
}
class C {
fun bar() {
val element = 1f
B().foo {
val e = element
}
}
}
fun main(args: Array<String>) {
C().bar()
}
// PRINT_FRAME
// EXPRESSION: element
// RESULT: 1.0: D
// EXPRESSION: this.prop
// RESULT: 1: I
@@ -0,0 +1,15 @@
LineBreakpoint created at frameInlineFunCallInsideInlineFunKotlinVariables.kt:21
Run Java
Connected to the target VM
frameInlineFunCallInsideInlineFunKotlinVariables.kt:21
frameInlineFunCallInsideInlineFunKotlinVariables.kt:7
frameInlineFunCallInsideInlineFunKotlinVariables.kt:8
Compile bytecode for element
Compile bytecode for this.prop
frame = bar:8, C {frameInlineFunCallInsideInlineFunKotlinVariables}
local = this: frameInlineFunCallInsideInlineFunKotlinVariables.A = {frameInlineFunCallInsideInlineFunKotlinVariables.A@uniqueID} (sp = null)
field = prop: int = 1 (sp = frameInlineFunCallInsideInlineFunKotlinVariables.kt, 11)
local = element: double = 1.0 (sp = frameInlineFunCallInsideInlineFunKotlinVariables.kt, 7)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,34 @@
package frameInnerClass
fun main(args: Array<String>) {
A().Inner().test()
}
class A {
val prop1 = 1
fun myFun1() = 1
inner class Inner {
val prop2 = 1
fun myFun2() = 1
fun test() {
//Breakpoint!
prop1 + prop2
}
}
}
// PRINT_FRAME
// EXPRESSION: prop1
// RESULT: 1: I
// EXPRESSION: prop2
// RESULT: 1: I
// EXPRESSION: myFun1()
// RESULT: 1: I
// EXPRESSION: myFun2()
// RESULT: 1: I
@@ -0,0 +1,16 @@
LineBreakpoint created at frameInnerClass.kt:17
Run Java
Connected to the target VM
frameInnerClass.kt:17
Compile bytecode for prop1
Compile bytecode for prop2
Compile bytecode for myFun1()
Compile bytecode for myFun2()
frame = test:17, A$Inner {frameInnerClass}
this = this = {frameInnerClass.A$Inner@uniqueID}
field = prop2: int = 1 (sp = frameInnerClass.kt, 12)
field = this$0: frameInnerClass.A = {frameInnerClass.A@uniqueID} (sp = null)
field = prop1: int = 1 (sp = frameInnerClass.kt, 8)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,27 @@
package frameInnerLambda
fun main(args: Array<String>) {
val val1 = 1
foo {
val val2 = 1
foo {
//Breakpoint!
val1 + val2
}
}
}
fun foo(f: () -> Unit) {
f()
}
// PRINT_FRAME
// EXPRESSION: val1
// RESULT: 1: I
// EXPRESSION: val2
// RESULT: 1: I
// EXPRESSION: val1 + val2
// RESULT: 2: I
@@ -0,0 +1,17 @@
LineBreakpoint created at frameInnerLambda.kt:9
Run Java
Connected to the target VM
frameInnerLambda.kt:9
Compile bytecode for val1
Compile bytecode for val2
Compile bytecode for val1 + val2
frame = invoke:9, FrameInnerLambdaKt$main$1$1 {frameInnerLambda}
this = this = {frameInnerLambda.FrameInnerLambdaKt$main$1$1@uniqueID}Function0<kotlin.Unit>
field = this$0: frameInnerLambda.FrameInnerLambdaKt$main$1 = {frameInnerLambda.FrameInnerLambdaKt$main$1@uniqueID}Function0<kotlin.Unit> (sp = null)
field = $val1: int = 1 (sp = null)
field = arity: int = 0 (sp = Lambda.!EXT!)
field = $val2: int = 1 (sp = null)
field = arity: int = 0 (sp = Lambda.!EXT!)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,18 @@
package frameLambda
fun main(args: Array<String>) {
val val1 = 1
foo {
//Breakpoint!
val1
}
}
fun foo(f: () -> Unit) {
f()
}
// PRINT_FRAME
// EXPRESSION: val1
// RESULT: 1: I
@@ -0,0 +1,12 @@
LineBreakpoint created at frameLambda.kt:7
Run Java
Connected to the target VM
frameLambda.kt:7
Compile bytecode for val1
frame = invoke:7, FrameLambdaKt$main$1 {frameLambda}
this = this = {frameLambda.FrameLambdaKt$main$1@uniqueID}Function0<kotlin.Unit>
field = $val1: int = 1 (sp = null)
field = arity: int = 0 (sp = Lambda.!EXT!)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,18 @@
package frameLambdaNotUsed
fun main(args: Array<String>) {
val val1 = 1
foo {
//Breakpoint!
val a = 1
}
}
fun foo(f: () -> Unit) {
f()
}
// PRINT_FRAME
// EXPRESSION: val1
// RESULT: 'val1' is not captured
@@ -0,0 +1,11 @@
LineBreakpoint created at frameLambdaNotUsed.kt:7
Run Java
Connected to the target VM
frameLambdaNotUsed.kt:7
Compile bytecode for val1
frame = invoke:7, FrameLambdaNotUsedKt$main$1 {frameLambdaNotUsed}
this = this = {frameLambdaNotUsed.FrameLambdaNotUsedKt$main$1@uniqueID}Function0<kotlin.Unit>
field = arity: int = 0 (sp = Lambda.!EXT!)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,9 @@
package frameLocalVariable
fun main(args: Array<String>) {
val val1 = 1
//Breakpoint!
val val2 = 1
}
// PRINT_FRAME
@@ -0,0 +1,10 @@
LineBreakpoint created at frameLocalVariable.kt:6
Run Java
Connected to the target VM
frameLocalVariable.kt:6
frame = main:6, FrameLocalVariableKt {frameLocalVariable}
local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = frameLocalVariable.kt, 3)
local = val1: int = 1 (sp = frameLocalVariable.kt, 4)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,25 @@
package frameObject
fun main(args: Array<String>) {
foo {
//Breakpoint!
O.obProp
}
}
object O {
val obProp = 1
fun obMyFun() = 1
}
fun foo(f: () -> Unit) {
f()
}
// PRINT_FRAME
// EXPRESSION: O.obProp
// RESULT: 1: I
// EXPRESSION: O.obMyFun()
// RESULT: 1: I
@@ -0,0 +1,12 @@
LineBreakpoint created at frameObject.kt:6
Run Java
Connected to the target VM
frameObject.kt:6
Compile bytecode for O.obProp
Compile bytecode for O.obMyFun()
frame = invoke:6, FrameObjectKt$main$1 {frameObject}
this = this = {frameObject.FrameObjectKt$main$1@uniqueID}Function0<kotlin.Unit>
field = arity: int = 0 (sp = Lambda.!EXT!)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,18 @@
package frameSharedVar
fun main(args: Array<String>) {
var var1 = 1
foo {
//Breakpoint!
var1 = 2
}
}
fun foo(f: () -> Unit) {
f()
}
// PRINT_FRAME
// EXPRESSION: var1
// RESULT: 1: I
@@ -0,0 +1,13 @@
LineBreakpoint created at frameSharedVar.kt:7
Run Java
Connected to the target VM
frameSharedVar.kt:7
Compile bytecode for var1
frame = invoke:7, FrameSharedVarKt$main$1 {frameSharedVar}
this = this = {frameSharedVar.FrameSharedVarKt$main$1@uniqueID}Function0<kotlin.Unit>
field = $var1: kotlin.jvm.internal.Ref$IntRef = {kotlin.jvm.internal.Ref$IntRef@uniqueID}1 (sp = null)
field = element: int = 1 (sp = Ref.!EXT!)
field = arity: int = 0 (sp = Lambda.!EXT!)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,18 @@
package frameSharedVarLocalVar
fun main(args: Array<String>) {
var var1 = 1
foo {
//Breakpoint!
var1 = 2
}
}
inline fun foo(f: () -> Unit) {
f()
}
// PRINT_FRAME
// EXPRESSION: var1
// RESULT: 1: I
@@ -0,0 +1,13 @@
LineBreakpoint created at frameSharedVarLocalVar.kt:7
Run Java
Connected to the target VM
frameSharedVarLocalVar.kt:7
Compile bytecode for var1
frame = main:7, FrameSharedVarLocalVarKt {frameSharedVarLocalVar}
local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = frameSharedVarLocalVar.kt, 3)
local = var1: int = 1 (sp = frameSharedVarLocalVar.kt, 4)
local = $i$f$foo: int = undefined (sp = null)
local = $i$a$-foo-FrameSharedVarLocalVarKt$main$1: int = undefined (sp = null)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,26 @@
package frameSimple
val topVal1 = 1
fun main(args: Array<String>) {
val val1 = 1
val val2 = MyClass()
//Breakpoint!
val1 + topVal1
}
class MyClass
// PRINT_FRAME
// EXPRESSION: val1
// RESULT: 1: I
// EXPRESSION: val2
// RESULT: instance of frameSimple.MyClass(id=ID): LframeSimple/MyClass;
// EXPRESSION: topVal1
// RESULT: 1: I
// EXPRESSION: val1 + topVal1
// RESULT: 2: I
@@ -0,0 +1,18 @@
LineBreakpoint created at frameSimple.kt:9
Run Java
Connected to the target VM
frameSimple.kt:9
Compile bytecode for val1
Compile bytecode for val2
Compile bytecode for topVal1
Compile bytecode for val1 + topVal1
frame = main:9, FrameSimpleKt {frameSimple}
static = static = frameSimple.FrameSimpleKt
field = topVal1: int = 1 (sp = frameSimple.kt, 3)
local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = frameSimple.kt, 5)
local = val1: int = 1 (sp = frameSimple.kt, 6)
local = val2: frameSimple.MyClass = {frameSimple.MyClass@uniqueID} (sp = frameSimple.kt, 7)
- Class has no fields
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,40 @@
package frameThis0
fun main(args: Array<String>) {
A().test()
}
class A {
val prop1 = 1
fun myFun() = 1
fun test() {
val val1 = 1
foo {
val val2 = 1
//Breakpoint!
prop1 + val1 + val2
}
}
}
fun foo(f: () -> Unit) {
f()
}
// PRINT_FRAME
// EXPRESSION: val1
// RESULT: 1: I
// EXPRESSION: val2
// RESULT: 1: I
// EXPRESSION: prop1
// RESULT: 1: I
// EXPRESSION: prop1 + val1 + val2
// RESULT: 3: I
// EXPRESSION: myFun()
// RESULT: 1: I
@@ -0,0 +1,19 @@
LineBreakpoint created at frameThis0.kt:16
Run Java
Connected to the target VM
frameThis0.kt:16
Compile bytecode for val1
Compile bytecode for val2
Compile bytecode for prop1
Compile bytecode for prop1 + val1 + val2
Compile bytecode for myFun()
frame = invoke:16, A$test$1 {frameThis0}
this = this = {frameThis0.A$test$1@uniqueID}Function0<kotlin.Unit>
field = this$0: frameThis0.A = {frameThis0.A@uniqueID} (sp = null)
field = prop1: int = 1 (sp = frameThis0.kt, 8)
field = $val1: int = 1 (sp = null)
field = arity: int = 0 (sp = Lambda.!EXT!)
local = val2: int = 1 (sp = frameThis0.kt, 14)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,54 @@
package frameThis0Ext
fun main(args: Array<String>) {
A().test()
}
class A {
val prop1 = 1
fun myFun1() = 1
fun AExt.testExt() {
val val1 = 1
foo {
//Breakpoint!
prop1 + prop2 + val1
}
}
fun test() {
AExt().testExt()
}
}
class AExt {
val prop2 = 1
fun myFun2() = 1
}
fun foo(f: () -> Unit) {
f()
}
// PRINT_FRAME
// EXPRESSION: val1
// RESULT: 1: I
// EXPRESSION: prop1
// RESULT: 1: I
// EXPRESSION: prop2
// RESULT: 1: I
// EXPRESSION: prop1 + val1
// RESULT: 2: I
// EXPRESSION: prop2 + val1
// RESULT: 2: I
// EXPRESSION: myFun1()
// RESULT: 1: I
// EXPRESSION: myFun2()
// RESULT: 1: I
@@ -0,0 +1,22 @@
LineBreakpoint created at frameThis0Ext.kt:15
Run Java
Connected to the target VM
frameThis0Ext.kt:15
Compile bytecode for val1
Compile bytecode for prop1
Compile bytecode for prop2
Compile bytecode for prop1 + val1
Compile bytecode for prop2 + val1
Compile bytecode for myFun1()
Compile bytecode for myFun2()
frame = invoke:15, A$testExt$1 {frameThis0Ext}
this = this = {frameThis0Ext.A$testExt$1@uniqueID}Function0<kotlin.Unit>
field = this$0: frameThis0Ext.A = {frameThis0Ext.A@uniqueID} (sp = null)
field = prop1: int = 1 (sp = frameThis0Ext.kt, 8)
field = $this_testExt: frameThis0Ext.AExt = {frameThis0Ext.AExt@uniqueID} (sp = null)
field = prop2: int = 1 (sp = frameThis0Ext.kt, 25)
field = $val1: int = 1 (sp = null)
field = arity: int = 0 (sp = Lambda.!EXT!)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,42 @@
package frameThis0This0
fun main(args: Array<String>) {
A().test()
}
class A {
val prop1 = 1
fun myFun() = 1
fun test() {
val val1 = 1
foo {
val val2 = 1
foo {
//Breakpoint!
prop1 + val1 + val2
}
}
}
}
fun foo(f: () -> Unit) {
f()
}
// PRINT_FRAME
// EXPRESSION: val1
// RESULT: 1: I
// EXPRESSION: val2
// RESULT: 1: I
// EXPRESSION: prop1
// RESULT: 1: I
// EXPRESSION: prop1 + val1 + val2
// RESULT: 3: I
// EXPRESSION: myFun()
// RESULT: 1: I
@@ -0,0 +1,21 @@
LineBreakpoint created at frameThis0This0.kt:17
Run Java
Connected to the target VM
frameThis0This0.kt:17
Compile bytecode for val1
Compile bytecode for val2
Compile bytecode for prop1
Compile bytecode for prop1 + val1 + val2
Compile bytecode for myFun()
frame = invoke:17, A$test$1$1 {frameThis0This0}
this = this = {frameThis0This0.A$test$1$1@uniqueID}Function0<kotlin.Unit>
field = this$0: frameThis0This0.A$test$1 = {frameThis0This0.A$test$1@uniqueID}Function0<kotlin.Unit> (sp = null)
field = this$0: frameThis0This0.A = {frameThis0This0.A@uniqueID} (sp = null)
field = prop1: int = 1 (sp = frameThis0This0.kt, 8)
field = $val1: int = 1 (sp = null)
field = arity: int = 0 (sp = Lambda.!EXT!)
field = $val2: int = 1 (sp = null)
field = arity: int = 0 (sp = Lambda.!EXT!)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,13 @@
package hideContinuationThis
suspend fun main() {
foo()
}
var foo: suspend () -> Unit = {
//Breakpoint!
val a = 5
}
// PRINT_FRAME
// SHOW_KOTLIN_VARIABLES
@@ -0,0 +1,10 @@
LineBreakpoint created at hideContinuationThis.kt:9
Run Java
Connected to the target VM
hideContinuationThis.kt:9
frame = invokeSuspend:9, HideContinuationThisKt$foo$1 {hideContinuationThis}
local = $result: java.lang.Object = {kotlin.Unit@uniqueID}kotlin.Unit (sp = null)
- No fields to display
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,16 @@
package hideSyntheticThis
fun main() {
block("foo") {
//Breakpoint!
val b = 4
}
}
fun <T> block(t: T, block: T.() -> Unit) {
t.block()
}
// PRINT_FRAME
// SHOW_KOTLIN_VARIABLES
// DESCRIPTOR_VIEW_OPTIONS: NAME_EXPRESSION
@@ -0,0 +1,14 @@
LineBreakpoint created at hideSyntheticThis.kt:6
Run Java
Connected to the target VM
hideSyntheticThis.kt:6
frame = invoke
local = this (expression = this)
field = value (expression = this.value)
element = 0 (expression = this.value[0])
element = 1 (expression = this.value[1])
element = 2 (expression = this.value[2])
field = hash (expression = this.hash)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,21 @@
package inlineFunThisKotlinVariables
class Same {
fun useInline() {
Different().inlineFun()
}
}
class Different {
inline fun inlineFun() {
//Breakpoint!
println(1)
}
}
fun main() {
Same().useInline()
}
// PRINT_FRAME
// SHOW_KOTLIN_VARIABLES
@@ -0,0 +1,11 @@
LineBreakpoint created at inlineFunThisKotlinVariables.kt:12
Run Java
Connected to the target VM
inlineFunThisKotlinVariables.kt:12
frame = useInline:12, Same {inlineFunThisKotlinVariables}
local = this: inlineFunThisKotlinVariables.Different = {inlineFunThisKotlinVariables.Different@uniqueID} (sp = null)
- Class has no fields
Disconnected from the target VM
Process finished with exit code 0
1
@@ -0,0 +1,22 @@
package lambdaFun1
fun foo() {
block {
//Breakpoint!
val a = 5
}
}
fun <T> block(block: () -> T): T {
return block()
}
fun main() {
foo()
}
// PRINT_FRAME
// SHOW_KOTLIN_VARIABLES
// EXPRESSION: this
// RESULT: 'this' is not defined in this context
@@ -0,0 +1,8 @@
LineBreakpoint created at lambdaFun1.kt:6
Run Java
Connected to the target VM
lambdaFun1.kt:6
frame = invoke:6, LambdaFun1Kt$foo$1 {lambdaFun1}
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,24 @@
package lambdaFun2
class Foo {
fun foo() {
block {
//Breakpoint!
val a = this@Foo
}
}
}
fun <T> block(block: () -> T): T {
return block()
}
fun main() {
Foo().foo()
}
// PRINT_FRAME
// SHOW_KOTLIN_VARIABLES
// EXPRESSION: this
// RESULT: instance of lambdaFun2.Foo(id=ID): LlambdaFun2/Foo;
@@ -0,0 +1,11 @@
LineBreakpoint created at lambdaFun2.kt:7
Run Java
Connected to the target VM
lambdaFun2.kt:7
Compile bytecode for this
frame = invoke:7, Foo$foo$1 {lambdaFun2}
unknown = this = {lambdaFun2.Foo@uniqueID}
- Class has no fields
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,24 @@
package lambdaFun3
object Foo {
fun foo() {
block {
//Breakpoint!
val a = this@Foo
}
}
}
fun <T> block(block: () -> T): T {
return block()
}
fun main() {
Foo.foo()
}
// PRINT_FRAME
// SHOW_KOTLIN_VARIABLES
// EXPRESSION: this
// RESULT: instance of lambdaFun3.Foo(id=ID): LlambdaFun3/Foo;
@@ -0,0 +1,9 @@
LineBreakpoint created at lambdaFun3.kt:7
Run Java
Connected to the target VM
lambdaFun3.kt:7
Compile bytecode for this
frame = invoke:7, Foo$foo$1 {lambdaFun3}
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,30 @@
package lambdaFun4
interface Foo {
fun foo() {
block {
with ("abc") {
//Breakpoint!
val a = this@Foo
}
}
}
}
fun <T> block(block: () -> T): T {
return block()
}
fun main() {
(object : Foo {}).foo()
}
// PRINT_FRAME
// SHOW_KOTLIN_VARIABLES
// RENDER_DELEGATED_PROPERTIES
// EXPRESSION: this
// RESULT: "abc": Ljava/lang/String;
// EXPRESSION: this@Foo
// RESULT: instance of lambdaFun4.LambdaFun4Kt$main$1(id=ID): LlambdaFun4/LambdaFun4Kt$main$1;
@@ -0,0 +1,16 @@
LineBreakpoint created at lambdaFun4.kt:8
Run Java
Connected to the target VM
lambdaFun4.kt:8
Compile bytecode for this
Compile bytecode for this@Foo
frame = invoke:8, Foo$foo$1 {lambdaFun4}
local = this: java.lang.String = abc (sp = null)
field = value: char[] = {char[3]@uniqueID} (sp = String.!EXT!)
element = 0 = 'a' 97
element = 1 = 'b' 98
element = 2 = 'c' 99
field = hash: int = 0 (sp = String.!EXT!)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,20 @@
package lambdaParameterMangling
private data class Foo(val a: String, val b: Int)
private fun foo(foo: Foo, block: (Foo) -> Unit) {
block(foo)
}
fun main() {
foo(Foo("a", 5)) { (a, b) ->
//Breakpoint!
val c = 5
}
}
// SHOW_KOTLIN_VARIABLES
// PRINT_FRAME
// EXPRESSION: a.length + b
// RESULT: 6: I
@@ -0,0 +1,14 @@
LineBreakpoint created at lambdaParameterMangling.kt:12
Run Java
Connected to the target VM
lambdaParameterMangling.kt:12
Compile bytecode for a.length + b
frame = invoke:12, LambdaParameterManglingKt$main$1 {lambdaParameterMangling}
local = a: java.lang.String = a (sp = lambdaParameterMangling.kt, 10)
field = value: char[] = {char[1]@uniqueID} (sp = String.!EXT!)
element = 0 = 'a' 97
field = hash: int = 0 (sp = String.!EXT!)
local = b: int = 5 (sp = lambdaParameterMangling.kt, 10)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,18 @@
package lambdaThisMangling
private fun block(block: (String) -> Unit) {
block("foo")
}
fun main() {
block { foo ->
//Breakpoint!
val a = 5
}
}
// SHOW_KOTLIN_VARIABLES
// PRINT_FRAME
// EXPRESSION: foo
// RESULT: "foo": Ljava/lang/String;
@@ -0,0 +1,15 @@
LineBreakpoint created at lambdaThisMangling.kt:10
Run Java
Connected to the target VM
lambdaThisMangling.kt:10
Compile bytecode for foo
frame = invoke:10, LambdaThisManglingKt$main$1 {lambdaThisMangling}
local = foo: java.lang.String = foo (sp = lambdaThisMangling.kt, 8)
field = value: char[] = {char[3]@uniqueID} (sp = String.!EXT!)
element = 0 = 'f' 102
element = 1 = 'o' 111
element = 2 = 'o' 111
field = hash: int = 0 (sp = String.!EXT!)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,14 @@
package localFunctionMangling
fun main() {
fun foo() {}
//Breakpoint!
val a = 5
}
// SHOW_KOTLIN_VARIABLES
// PRINT_FRAME
// EXPRESSION: 1
// RESULT: 1: I
@@ -0,0 +1,9 @@
LineBreakpoint created at localFunctionMangling.kt:7
Run Java
Connected to the target VM
localFunctionMangling.kt:7
Compile bytecode for 1
frame = main:7, LocalFunctionManglingKt {localFunctionMangling}
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,25 @@
package nestedInlineFun
fun main() {
val a = 1
foo {
val b = 2
//Breakpoint!
val c = 0
}
}
inline fun foo(block: () -> Unit) {
val x = 3
bar(1, block)
}
inline fun bar(count: Int, block: () -> Unit) {
var i = count
while (i-- > 0) {
block()
}
}
// SHOW_KOTLIN_VARIABLES
// PRINT_FRAME
@@ -0,0 +1,10 @@
LineBreakpoint created at nestedInlineFun.kt:8
Run Java
Connected to the target VM
nestedInlineFun.kt:8
frame = main:8, NestedInlineFunKt {nestedInlineFun}
local = a: int = 1 (sp = nestedInlineFun.kt, 4)
local = b: int = 2 (sp = nestedInlineFun.kt, 6)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,27 @@
package nestedInlineFun2
fun main() {
val a = 1
foo {
val b = 2
}
}
inline fun foo(block: () -> Unit) {
val x = 3
bar(1) {
val y = 2
//Breakpoint!
block()
}
}
inline fun bar(count: Int, block: () -> Unit) {
var i = count
while (i-- > 0) {
block()
}
}
// SHOW_KOTLIN_VARIABLES
// PRINT_FRAME
@@ -0,0 +1,10 @@
LineBreakpoint created at nestedInlineFun2.kt:15
Run Java
Connected to the target VM
nestedInlineFun2.kt:15
frame = main:15, NestedInlineFun2Kt {nestedInlineFun2}
local = x: int = 3 (sp = nestedInlineFun2.kt, 11)
local = y: int = 2 (sp = nestedInlineFun2.kt, 13)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,20 @@
package remapThis
fun main() {
Bar().bar()
}
class Bar {
fun bar() {
"a".foo()
}
fun String.foo() {
//Breakpoint!
val a = this
}
}
// PRINT_FRAME
// SHOW_KOTLIN_VARIABLES
// DESCRIPTOR_VIEW_OPTIONS: NAME_EXPRESSION
@@ -0,0 +1,14 @@
LineBreakpoint created at remapThis.kt:14
Run Java
Connected to the target VM
remapThis.kt:14
frame = foo
this = this (@Bar) (expression = this)
-
local = this (expression = this)
field = value (expression = this.value)
element = 0 (expression = this.value[0])
field = hash (expression = this.hash)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,17 @@
package suspendContinuation
suspend fun main() {
val a = 5
foo()
//Breakpoint!
val b = 4
}
suspend fun foo() {}
// PRINT_FRAME
// SHOW_KOTLIN_VARIABLES
// RENDER_DELEGATED_PROPERTIES
// EXPRESSION: a
// RESULT: 5: I
@@ -0,0 +1,11 @@
LineBreakpoint created at suspendContinuation.kt:7
Run Java
Connected to the target VM
suspendContinuation.kt:7
Compile bytecode for a
frame = main:7, SuspendContinuationKt {suspendContinuation}
local = $result: java.lang.Object = null (sp = null)
local = a: int = 5 (sp = suspendContinuation.kt, 4)
Disconnected from the target VM
Process finished with exit code 0