From 7fb8357b28449cf2091b9c206f78307df69c02cb Mon Sep 17 00:00:00 2001 From: Yan Zhulanow Date: Wed, 26 Dec 2018 15:38:36 +0300 Subject: [PATCH] Allow '// PRINT_FRAME' option for multi-breakpoint stepping tests --- .../createExpressionCastToBuiltIn.out | 13 ---- .../createExpressionSimple.out | 20 ----- .../createExpressionWithArray.out | 16 ---- .../evBreakpointOnPropertyDeclaration.out | 18 ----- .../extraVariables/evDelegatedProperty.out | 16 ---- .../extraVariables/evDuplicateItems.out | 13 ---- .../extraVariables/evFinalProperty.out | 13 ---- .../extraVariables/evFunctionDeclaration.out | 12 --- .../extraVariables/evLineRange.out | 22 ------ .../extraVariables/evProperty.out | 15 ---- .../extraVariables/evPropertyRefExpr.out | 18 ----- .../extraVariables/evSkipAnonymousObject.out | 26 ------- .../extraVariables/evSkipLambda.out | 21 ------ .../extraVariables/evSkipLocalClass.out | 22 ------ .../singleBreakpoint/frame/catchVariable.out | 14 ---- .../frame/delegatedPropertyInClass.out | 28 ------- .../delegatedPropertyInClassWithToString.out | 22 ------ .../delegatedPropertyInClassWoRenderer.out | 22 ------ .../frame/frameAnonymousObject.out | 23 ------ .../frame/frameClassObject.out | 31 -------- .../frame/frameClosingBracket.out | 11 --- .../frame/frameExtFunExtFun.out | 73 ------------------- .../frame/frameExtensionFun.out | 23 ------ .../frame/frameInlineArgument.out | 25 ------- .../frameInlineArgumentInsideInlineFun.out | 38 ---------- .../singleBreakpoint/frame/frameInlineFun.out | 28 ------- .../frameInlineFunCallInsideInlineFun.out | 47 ------------ ...eFunCallInsideInlineFunKotlinVariables.out | 49 ------------- .../frame/frameInnerClass.out | 34 --------- .../frame/frameInnerLambda.out | 27 ------- .../singleBreakpoint/frame/frameLambda.out | 18 ----- .../frame/frameLambdaNotUsed.out | 18 ----- .../frame/frameLocalVariable.out | 9 --- .../singleBreakpoint/frame/frameObject.out | 25 ------- .../singleBreakpoint/frame/frameSharedVar.out | 18 ----- .../frame/frameSharedVarLocalVar.out | 18 ----- .../singleBreakpoint/frame/frameSimple.out | 26 ------- .../singleBreakpoint/frame/frameThis0.out | 40 ---------- .../singleBreakpoint/frame/frameThis0Ext.out | 54 -------------- .../frame/frameThis0This0.out | 42 ----------- .../frame/hideContinuationThis.out | 13 ---- .../frame/hideSyntheticThis.out | 16 ---- .../singleBreakpoint/frame/remapThis.out | 20 ----- .../frame/suspendContinuation.out | 16 ---- .../lambdas/destructuringParam.out | 22 ------ .../lambdas/underscoreNames.out | 33 --------- .../renderer/toStringRenderer.out | 13 ---- .../AbstractKotlinEvaluateExpressionTest.kt | 70 +++++++++++------- 48 files changed, 43 insertions(+), 1168 deletions(-) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/createExpression/createExpressionCastToBuiltIn.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/createExpression/createExpressionCastToBuiltIn.out index bded1f27e21..982601279aa 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/createExpression/createExpressionCastToBuiltIn.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/createExpression/createExpressionCastToBuiltIn.out @@ -2,19 +2,6 @@ LineBreakpoint created at createExpressionCastToBuiltIn.kt:7 Run Java Connected to the target VM createExpressionCastToBuiltIn.kt:7 -package createExpressionCastToBuiltIn - -fun main(args: Array) { - val primitiveArray = intArrayOf(1) - val stringArray = arrayOf("a") - //Breakpoint! - val a = 1 -} - -// PRINT_FRAME -// SKIP: value, hash, hash32, offset, count -// DESCRIPTOR_VIEW_OPTIONS: NAME_EXPRESSION_RESULT - Compile bytecode for args Compile bytecode for primitiveArray Compile bytecode for primitiveArray[0] diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/createExpression/createExpressionSimple.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/createExpression/createExpressionSimple.out index ca28d91f61e..6d592041e9a 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/createExpression/createExpressionSimple.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/createExpression/createExpressionSimple.out @@ -2,26 +2,6 @@ LineBreakpoint created at createExpressionSimple.kt:15 Run Java Connected to the target VM createExpressionSimple.kt:15 -package createExpressionSimple - -class MyClass: Base() { - val i = 1 -} - -open class Base { - val baseI = 2 -} - -fun main(args: Array) { - val myClass: Base = MyClass() - val myBase = Base() - //Breakpoint! - val a = 1 -} - -// PRINT_FRAME -// DESCRIPTOR_VIEW_OPTIONS: NAME_EXPRESSION - frame = main local = args (expression = args) local = myClass (expression = myClass) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/createExpression/createExpressionWithArray.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/createExpression/createExpressionWithArray.out index 48f921a30db..421c609be92 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/createExpression/createExpressionWithArray.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/createExpression/createExpressionWithArray.out @@ -2,22 +2,6 @@ LineBreakpoint created at createExpressionWithArray.kt:11 Run Java Connected to the target VM createExpressionWithArray.kt:11 -package createExpressionWithArray - -import forTests.MyJavaClass -// do not remove this import, it checks that we do not insert ambiguous imports during EE -import forTests.MyJavaClass.InnerClass - -fun main(args: Array) { - val baseArray = arrayOf(MyJavaClass().getBaseClassValue()) - val innerArray = arrayOf(MyJavaClass().getInnerClassValue()) - //Breakpoint! - val a = 1 -} - -// PRINT_FRAME -// DESCRIPTOR_VIEW_OPTIONS: NAME_EXPRESSION_RESULT - Compile bytecode for args Compile bytecode for baseArray Compile bytecode for baseArray[0] diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evBreakpointOnPropertyDeclaration.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evBreakpointOnPropertyDeclaration.out index 49d8e4d9f31..74801f63cef 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evBreakpointOnPropertyDeclaration.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evBreakpointOnPropertyDeclaration.out @@ -2,24 +2,6 @@ LineBreakpoint created at evBreakpointOnPropertyDeclaration.kt:14 Run Java Connected to the target VM evBreakpointOnPropertyDeclaration.kt:14 -package evBreakpointOnPropertyDeclaration - -class A { - var prop = 1 -} - -fun main(args: Array) { - val a1 = A() - val a2 = A() - val a3 = A() - - val p1 = a1.prop - //Breakpoint! - val p2 = a2.prop - val p3 = a3.prop -} - -// PRINT_FRAME Compile bytecode for a2.prop frame = main:14, EvBreakpointOnPropertyDeclarationKt {evBreakpointOnPropertyDeclaration} local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = evBreakpointOnPropertyDeclaration.kt, 7) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evDelegatedProperty.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evDelegatedProperty.out index a259911f281..6b17b0ddcee 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evDelegatedProperty.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evDelegatedProperty.out @@ -2,22 +2,6 @@ LineBreakpoint created at evDelegatedProperty.kt:13 Run Java Connected to the target VM evDelegatedProperty.kt:13 -package evDelegatedProperty - -import kotlin.properties.Delegates - -class A { - var prop: Int by Delegates.notNull() -} - -fun main(args: Array) { - val a = A() - a.prop = 1 - //Breakpoint! - val b = a.prop -} - -// PRINT_FRAME frame = main:13, EvDelegatedPropertyKt {evDelegatedProperty} local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = evDelegatedProperty.kt, 9) local = a: evDelegatedProperty.A = {evDelegatedProperty.A@uniqueID} (sp = evDelegatedProperty.kt, 10) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evDuplicateItems.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evDuplicateItems.out index b134a0dda3b..af38a87b11d 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evDuplicateItems.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evDuplicateItems.out @@ -2,19 +2,6 @@ LineBreakpoint created at evDuplicateItems.kt:10 Run Java Connected to the target VM evDuplicateItems.kt:10 -package evDuplicateItems - -class A { - var prop = 1 -} - -fun main(args: Array) { - val a = A() - //Breakpoint! - val b = a.prop + a.prop -} - -// PRINT_FRAME Compile bytecode for a.prop frame = main:10, EvDuplicateItemsKt {evDuplicateItems} local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = evDuplicateItems.kt, 7) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evFinalProperty.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evFinalProperty.out index fdff4f47b61..6ef67c09ef8 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evFinalProperty.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evFinalProperty.out @@ -2,19 +2,6 @@ LineBreakpoint created at evFinalProperty.kt:10 Run Java Connected to the target VM evFinalProperty.kt:10 -package evFinalProperty - -class A { - val prop = 1 -} - -fun main(args: Array) { - val a = A() - //Breakpoint! - val b = a.prop -} - -// PRINT_FRAME frame = main:10, EvFinalPropertyKt {evFinalProperty} local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = evFinalProperty.kt, 7) local = a: evFinalProperty.A = {evFinalProperty.A@uniqueID} (sp = evFinalProperty.kt, 8) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evFunctionDeclaration.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evFunctionDeclaration.out index afe1f07084c..538ca1e7c01 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evFunctionDeclaration.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evFunctionDeclaration.out @@ -2,18 +2,6 @@ LineBreakpoint created at evFunctionDeclaration.kt:5 Run Java Connected to the target VM evFunctionDeclaration.kt:5 -package evFunctionDeclaration - -class A(val a: Int) { - //Breakpoint! - fun foo() = a -} - -fun main(args: Array) { - A(1).foo() -} - -// PRINT_FRAME Compile bytecode for a frame = foo:5, A {evFunctionDeclaration} this = this = {evFunctionDeclaration.A@uniqueID} diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evLineRange.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evLineRange.out index ac685db3053..fe22575df8d 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evLineRange.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evLineRange.out @@ -2,28 +2,6 @@ LineBreakpoint created at evLineRange.kt:15 Run Java Connected to the target VM evLineRange.kt:15 -package evLineRange - -class A { - var prop = 1 -} - -fun main(args: Array) { - val a1 = A() - val a2 = A() - val a3 = A() - - foo(a1.prop) - val i1 = 1 - //Breakpoint! - foo(a2.prop) - val i2 = 1 - foo(a3.prop) -} - -fun foo(i: Int) {} - -// PRINT_FRAME Compile bytecode for a2.prop frame = main:15, EvLineRangeKt {evLineRange} local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = evLineRange.kt, 7) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evProperty.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evProperty.out index de3192b313d..a4f94709872 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evProperty.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evProperty.out @@ -2,21 +2,6 @@ LineBreakpoint created at evProperty.kt:10 Run Java Connected to the target VM evProperty.kt:10 -package evProperty - -class A { - var prop = 1 -} - -fun main(args: Array) { - val a = A() - //Breakpoint! - if (a.prop == 1) { - - } -} - -// PRINT_FRAME Compile bytecode for a.prop frame = main:10, EvPropertyKt {evProperty} local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = evProperty.kt, 7) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evPropertyRefExpr.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evPropertyRefExpr.out index 6a1ecde0610..17a437fc4b1 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evPropertyRefExpr.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evPropertyRefExpr.out @@ -2,24 +2,6 @@ LineBreakpoint created at evPropertyRefExpr.kt:8 Run Java Connected to the target VM evPropertyRefExpr.kt:8 -package evPropertyRefExpr - -class A { - var prop = 1 - - fun test() { - //Breakpoint! - if (prop == 1) { - - } - } -} - -fun main(args: Array) { - A().test() -} - -// PRINT_FRAME Compile bytecode for prop frame = test:8, A {evPropertyRefExpr} this = this = {evPropertyRefExpr.A@uniqueID} diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evSkipAnonymousObject.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evSkipAnonymousObject.out index 03252654425..b91f117b630 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evSkipAnonymousObject.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evSkipAnonymousObject.out @@ -2,32 +2,6 @@ LineBreakpoint created at evSkipAnonymousObject.kt:12 Run Java Connected to the target VM evSkipAnonymousObject.kt:12 -package evSkipAnonymousObject - -class A { - var prop = 1 -} - -fun main(args: Array) { - val a1 = A() - val a2 = A() - - //Breakpoint! - foo(a1.prop) - object: T { - override fun f() { - foo(a2.prop) - } - } -} - -interface T { - fun f() {} -} - -fun foo(i: Int) {} - -// PRINT_FRAME Compile bytecode for a1.prop frame = main:12, EvSkipAnonymousObjectKt {evSkipAnonymousObject} local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = evSkipAnonymousObject.kt, 7) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evSkipLambda.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evSkipLambda.out index 2db9bdc7cca..c0bebeaa313 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evSkipLambda.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evSkipLambda.out @@ -2,27 +2,6 @@ LineBreakpoint created at evSkipLambda.kt:12 Run Java Connected to the target VM evSkipLambda.kt:12 -package evSkipLambda - -class A { - var prop = 1 -} - -fun main(args: Array) { - val a1 = A() - val a2 = A() - - //Breakpoint! - foo(a1.prop) - l { - foo(a2.prop) - } -} - -fun foo(i: Int) {} -fun l(f: () -> Unit) {} - -// PRINT_FRAME Compile bytecode for a1.prop frame = main:12, EvSkipLambdaKt {evSkipLambda} local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = evSkipLambda.kt, 7) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evSkipLocalClass.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evSkipLocalClass.out index 60c21d27af8..e6a7ba01df7 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evSkipLocalClass.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evSkipLocalClass.out @@ -2,28 +2,6 @@ LineBreakpoint created at evSkipLocalClass.kt:12 Run Java Connected to the target VM evSkipLocalClass.kt:12 -package evSkipLocalClass - -class A { - var prop = 1 -} - -fun main(args: Array) { - val a1 = A() - val a2 = A() - - //Breakpoint! - foo(a1.prop) - class B { - fun bar() { - foo(a2.prop) - } - } -} - -fun foo(i: Int) {} - -// PRINT_FRAME Compile bytecode for a1.prop frame = main:12, EvSkipLocalClassKt {evSkipLocalClass} local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = evSkipLocalClass.kt, 7) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/catchVariable.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/catchVariable.out index 58f2929a62c..08fbe2b76de 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/catchVariable.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/catchVariable.out @@ -2,20 +2,6 @@ LineBreakpoint created at catchVariable.kt:9 Run Java Connected to the target VM catchVariable.kt:9 -package catchVariable - -fun main(args: Array) { - try { - throw Exception() - - } - //Breakpoint! - catch (e: Exception) { - - } -} - -// PRINT_FRAME frame = main:9, CatchVariableKt {catchVariable} local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = catchVariable.kt, 3) Disconnected from the target VM diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClass.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClass.out index 0b1caeafe50..6d223423677 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClass.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClass.out @@ -2,34 +2,6 @@ LineBreakpoint created at delegatedPropertyInClass.kt:9 Run Java Connected to the target VM delegatedPropertyInClass.kt:9 -package delegatedPropertyInClass - -import kotlin.properties.Delegates -import kotlin.reflect.KProperty - -fun main(args: Array) { - 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 -// SKIP: suppressedExceptions -// SKIP: stackTrace - Compile bytecode for args.size frame = main:9, DelegatedPropertyInClassKt {delegatedPropertyInClass} local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = delegatedPropertyInClass.kt, 6) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClassWithToString.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClassWithToString.out index 7eeef786495..fefe8e2c131 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClassWithToString.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClassWithToString.out @@ -2,28 +2,6 @@ LineBreakpoint created at delegatedPropertyInClassWithToString.kt:8 Run Java Connected to the target VM delegatedPropertyInClassWithToString.kt:8 -package delegatedPropertyInClassWithToString - -import kotlin.reflect.KProperty - -fun main(args: Array) { - 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 - Compile bytecode for args.size frame = main:8, DelegatedPropertyInClassWithToStringKt {delegatedPropertyInClassWithToString} local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = delegatedPropertyInClassWithToString.kt, 5) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClassWoRenderer.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClassWoRenderer.out index 1618b1d0ee0..6c314f5a1eb 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClassWoRenderer.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClassWoRenderer.out @@ -2,28 +2,6 @@ LineBreakpoint created at delegatedPropertyInClassWoRenderer.kt:9 Run Java Connected to the target VM delegatedPropertyInClassWoRenderer.kt:9 -package delegatedPropertyInClassWoRenderer - -import kotlin.properties.Delegates -import kotlin.reflect.KProperty - -fun main(args: Array) { - 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: false -// PRINT_FRAME - Compile bytecode for args.size frame = main:9, DelegatedPropertyInClassWoRendererKt {delegatedPropertyInClassWoRenderer} local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = delegatedPropertyInClassWoRenderer.kt, 6) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameAnonymousObject.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameAnonymousObject.out index ae3f7148b33..de4d3be69fb 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameAnonymousObject.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameAnonymousObject.out @@ -2,29 +2,6 @@ LineBreakpoint created at frameAnonymousObject.kt:11 Run Java Connected to the target VM frameAnonymousObject.kt:11 -package frameAnonymousObject - -fun main(args: Array) { - val val1 = 1 - val o = object { - val obProp = 1 - - fun run() { - foo { - //Breakpoint! - val1 + obProp - } - } - } - - o.run() -} - -fun foo(f: () -> Unit) { - f() -} - -// PRINT_FRAME frame = invoke:11, FrameAnonymousObjectKt$main$o$1$run$1 {frameAnonymousObject} this = this = {frameAnonymousObject.FrameAnonymousObjectKt$main$o$1$run$1@uniqueID}Function0 field = this$0: frameAnonymousObject.FrameAnonymousObjectKt$main$o$1 = {frameAnonymousObject.FrameAnonymousObjectKt$main$o$1@uniqueID} (sp = null) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameClassObject.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameClassObject.out index d33db064ce7..ec3c7b4b40a 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameClassObject.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameClassObject.out @@ -4,37 +4,6 @@ Connected to the target VM frameClassObject.kt:16 Compile bytecode for prop Compile bytecode for myFun() -package frameClassObject - -fun main(args: Array) { - 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 frame = invoke:16, A$test$1 {frameClassObject} this = this = {frameClassObject.A$test$1@uniqueID}Function0 field = arity: int = 0 (sp = Lambda.!EXT!) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameClosingBracket.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameClosingBracket.out index bbe7a024820..28229453f48 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameClosingBracket.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameClosingBracket.out @@ -3,17 +3,6 @@ Run Java Connected to the target VM frameClosingBracket.kt:6 Compile bytecode for a -package frameClosingBracket - -fun main(args: Array) { - val a = 1 - //Breakpoint! -} - -// PRINT_FRAME -// EXPRESSION: a -// RESULT: 1: I - 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) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameExtFunExtFun.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameExtFunExtFun.out index 50c24da1ea5..b57c01ddfd2 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameExtFunExtFun.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameExtFunExtFun.out @@ -10,79 +10,6 @@ Compile bytecode for bProp Compile bytecode for aMyFun() Compile bytecode for outerMyFun() Compile bytecode for bMyFun() -package frameExtFunExtFun - -fun main(args: Array) { - 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 frame = invoke:24, Outer$foo$LocalClass$test$1 {frameExtFunExtFun} this = this = {frameExtFunExtFun.Outer$foo$LocalClass$test$1@uniqueID}Function0 field = this$0: frameExtFunExtFun.Outer$foo$LocalClass = {frameExtFunExtFun.Outer$foo$LocalClass@uniqueID} (sp = null) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameExtensionFun.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameExtensionFun.out index 9b1f0ce21b4..7d9035c7034 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameExtensionFun.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameExtensionFun.out @@ -4,29 +4,6 @@ Connected to the target VM frameExtensionFun.kt:14 Compile bytecode for prop Compile bytecode for myFun() -package frameExtensionFun - -fun main(args: Array) { - 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 frame = foo:14, FrameExtensionFunKt {frameExtensionFun} local = $this$foo: frameExtensionFun.A = {frameExtensionFun.A@uniqueID} (sp = null) field = prop: int = 1 (sp = frameExtensionFun.kt, 8) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineArgument.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineArgument.out index 37c48e10ce3..69f1270fa56 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineArgument.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineArgument.out @@ -3,31 +3,6 @@ Run Java Connected to the target VM frameInlineArgument.kt:7 Compile bytecode for element -package frameInlineArgument - -fun main(args: Array) { - 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 - - 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) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineArgumentInsideInlineFun.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineArgumentInsideInlineFun.out index 16e02b361c0..3b71ea69b79 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineArgumentInsideInlineFun.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineArgumentInsideInlineFun.out @@ -3,44 +3,6 @@ Run Java Connected to the target VM frameInlineArgumentInsideInlineFun.kt:16 Compile bytecode for element -// 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) { - C().bar() -} - -// PRINT_FRAME - -// EXPRESSION: element -// RESULT: 1: I frame = bar:16, C {frameInlineArgumentInsideInlineFun} this = this = {frameInlineArgumentInsideInlineFun.C@uniqueID} - Class has no fields diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineFun.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineFun.out index 1895694d2e2..4f16801efaf 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineFun.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineFun.out @@ -4,34 +4,6 @@ Connected to the target VM frameInlineFun.kt:14 Compile bytecode for element Compile bytecode for this.prop -package frameInlineFun - -fun main(args: Array) { - 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 - - 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) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineFunCallInsideInlineFun.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineFunCallInsideInlineFun.out index ebd410e4bc7..82bd77f5f04 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineFunCallInsideInlineFun.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineFunCallInsideInlineFun.out @@ -6,53 +6,6 @@ frameInlineFunCallInsideInlineFun.kt:5 frameInlineFunCallInsideInlineFun.kt:6 Compile bytecode for element Compile bytecode for this.prop -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) { - C().bar() -} - -// PRINT_FRAME - -// EXPRESSION: element -// RESULT: 1.0: D - -// EXPRESSION: this.prop -// RESULT: 1: I - - frame = bar:6, C {frameInlineFunCallInsideInlineFun} this = this = {frameInlineFunCallInsideInlineFun.C@uniqueID} - Class has no fields diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineFunCallInsideInlineFunKotlinVariables.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineFunCallInsideInlineFunKotlinVariables.out index 00037fd3bf9..7d45041e2c7 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineFunCallInsideInlineFunKotlinVariables.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineFunCallInsideInlineFunKotlinVariables.out @@ -6,55 +6,6 @@ frameInlineFunCallInsideInlineFunKotlinVariables.kt:7 frameInlineFunCallInsideInlineFunKotlinVariables.kt:8 Compile bytecode for element Compile bytecode for this.prop -// 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) { - C().bar() -} - -// PRINT_FRAME - -// EXPRESSION: element -// RESULT: 1.0: D - -// EXPRESSION: this.prop -// RESULT: 1: I - - frame = bar:8, C {frameInlineFunCallInsideInlineFunKotlinVariables} this = this = {frameInlineFunCallInsideInlineFunKotlinVariables.C@uniqueID} - Class has no fields diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInnerClass.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInnerClass.out index 31a1a8eef6b..492dbdf907e 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInnerClass.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInnerClass.out @@ -6,40 +6,6 @@ Compile bytecode for prop1 Compile bytecode for prop2 Compile bytecode for myFun1() Compile bytecode for myFun2() -package frameInnerClass - -fun main(args: Array) { - 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 frame = test:17, A$Inner {frameInnerClass} this = this = {frameInnerClass.A$Inner@uniqueID} field = prop2: int = 1 (sp = frameInnerClass.kt, 12) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInnerLambda.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInnerLambda.out index f4c3988b199..3f09a7539da 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInnerLambda.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInnerLambda.out @@ -5,33 +5,6 @@ frameInnerLambda.kt:9 Compile bytecode for val1 Compile bytecode for val2 Compile bytecode for val1 + val2 -package frameInnerLambda - -fun main(args: Array) { - 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 frame = invoke:9, FrameInnerLambdaKt$main$1$1 {frameInnerLambda} this = this = {frameInnerLambda.FrameInnerLambdaKt$main$1$1@uniqueID}Function0 field = this$0: frameInnerLambda.FrameInnerLambdaKt$main$1 = {frameInnerLambda.FrameInnerLambdaKt$main$1@uniqueID}Function0 (sp = null) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameLambda.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameLambda.out index d192fbeb370..ababef46b15 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameLambda.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameLambda.out @@ -3,24 +3,6 @@ Run Java Connected to the target VM frameLambda.kt:7 Compile bytecode for val1 -package frameLambda - -fun main(args: Array) { - val val1 = 1 - foo { - //Breakpoint! - val1 - } -} - -fun foo(f: () -> Unit) { - f() -} - -// PRINT_FRAME - -// EXPRESSION: val1 -// RESULT: 1: I frame = invoke:7, FrameLambdaKt$main$1 {frameLambda} this = this = {frameLambda.FrameLambdaKt$main$1@uniqueID}Function0 field = $val1: int = 1 (sp = null) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameLambdaNotUsed.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameLambdaNotUsed.out index 91f222c4172..92554c2acd2 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameLambdaNotUsed.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameLambdaNotUsed.out @@ -3,24 +3,6 @@ Run Java Connected to the target VM frameLambdaNotUsed.kt:7 Compile bytecode for val1 -package frameLambdaNotUsed - -fun main(args: Array) { - val val1 = 1 - foo { - //Breakpoint! - val a = 1 - } -} - -fun foo(f: () -> Unit) { - f() -} - -// PRINT_FRAME - -// EXPRESSION: val1 -// RESULT: 'val1' is not captured frame = invoke:7, FrameLambdaNotUsedKt$main$1 {frameLambdaNotUsed} this = this = {frameLambdaNotUsed.FrameLambdaNotUsedKt$main$1@uniqueID}Function0 field = arity: int = 0 (sp = Lambda.!EXT!) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameLocalVariable.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameLocalVariable.out index e6e50eb413c..c82d04e7d75 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameLocalVariable.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameLocalVariable.out @@ -2,15 +2,6 @@ LineBreakpoint created at frameLocalVariable.kt:6 Run Java Connected to the target VM frameLocalVariable.kt:6 -package frameLocalVariable - -fun main(args: Array) { - val val1 = 1 - //Breakpoint! - val val2 = 1 -} - -// PRINT_FRAME 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) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameObject.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameObject.out index ffb4a20a188..95258a20c76 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameObject.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameObject.out @@ -4,31 +4,6 @@ Connected to the target VM frameObject.kt:6 Compile bytecode for O.obProp Compile bytecode for O.obMyFun() -package frameObject - -fun main(args: Array) { - 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 frame = invoke:6, FrameObjectKt$main$1 {frameObject} this = this = {frameObject.FrameObjectKt$main$1@uniqueID}Function0 field = arity: int = 0 (sp = Lambda.!EXT!) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameSharedVar.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameSharedVar.out index 73593efa8b5..436d9b1e935 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameSharedVar.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameSharedVar.out @@ -3,24 +3,6 @@ Run Java Connected to the target VM frameSharedVar.kt:7 Compile bytecode for var1 -package frameSharedVar - -fun main(args: Array) { - var var1 = 1 - foo { - //Breakpoint! - var1 = 2 - } -} - -fun foo(f: () -> Unit) { - f() -} - -// PRINT_FRAME - -// EXPRESSION: var1 -// RESULT: 1: I frame = invoke:7, FrameSharedVarKt$main$1 {frameSharedVar} this = this = {frameSharedVar.FrameSharedVarKt$main$1@uniqueID}Function0 field = $var1: kotlin.jvm.internal.Ref$IntRef = {kotlin.jvm.internal.Ref$IntRef@uniqueID}1 (sp = null) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameSharedVarLocalVar.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameSharedVarLocalVar.out index 78e6ab556fa..e2f178a0bfb 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameSharedVarLocalVar.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameSharedVarLocalVar.out @@ -3,24 +3,6 @@ Run Java Connected to the target VM frameSharedVarLocalVar.kt:7 Compile bytecode for var1 -package frameSharedVarLocalVar - -fun main(args: Array) { - var var1 = 1 - foo { - //Breakpoint! - var1 = 2 - } -} - -inline fun foo(f: () -> Unit) { - f() -} - -// PRINT_FRAME - -// EXPRESSION: var1 -// RESULT: 1: I 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) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameSimple.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameSimple.out index 351ba2f7dab..e0df7a6214b 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameSimple.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameSimple.out @@ -6,32 +6,6 @@ Compile bytecode for val1 Compile bytecode for val2 Compile bytecode for topVal1 Compile bytecode for val1 + topVal1 -package frameSimple - -val topVal1 = 1 - -fun main(args: Array) { - 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 frame = main:9, FrameSimpleKt {frameSimple} static = static = frameSimple.FrameSimpleKt field = topVal1: int = 1 (sp = frameSimple.kt, 3) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0.out index b311da9b70d..8afe2ff381e 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0.out @@ -7,46 +7,6 @@ Compile bytecode for val2 Compile bytecode for prop1 Compile bytecode for prop1 + val1 + val2 Compile bytecode for myFun() -package frameThis0 - -fun main(args: Array) { - 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 frame = invoke:16, A$test$1 {frameThis0} this = this = {frameThis0.A$test$1@uniqueID}Function0 field = this$0: frameThis0.A = {frameThis0.A@uniqueID} (sp = null) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0Ext.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0Ext.out index afcda494f6e..9c9af823221 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0Ext.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0Ext.out @@ -9,60 +9,6 @@ Compile bytecode for prop1 + val1 Compile bytecode for prop2 + val1 Compile bytecode for myFun1() Compile bytecode for myFun2() -package frameThis0Ext - -fun main(args: Array) { - 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 frame = invoke:15, A$testExt$1 {frameThis0Ext} this = this = {frameThis0Ext.A$testExt$1@uniqueID}Function0 field = this$0: frameThis0Ext.A = {frameThis0Ext.A@uniqueID} (sp = null) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0This0.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0This0.out index e882011ef3b..00ba37bcaaa 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0This0.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0This0.out @@ -7,48 +7,6 @@ Compile bytecode for val2 Compile bytecode for prop1 Compile bytecode for prop1 + val1 + val2 Compile bytecode for myFun() -package frameThis0This0 - -fun main(args: Array) { - 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 frame = invoke:17, A$test$1$1 {frameThis0This0} this = this = {frameThis0This0.A$test$1$1@uniqueID}Function0 field = this$0: frameThis0This0.A$test$1 = {frameThis0This0.A$test$1@uniqueID}Function0 (sp = null) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/hideContinuationThis.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/hideContinuationThis.out index 1478bc3c25a..0e4322aeda2 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/hideContinuationThis.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/hideContinuationThis.out @@ -2,19 +2,6 @@ LineBreakpoint created at hideContinuationThis.kt:9 Run Java Connected to the target VM hideContinuationThis.kt:9 -package hideContinuationThis - -suspend fun main() { - foo() -} - -var foo: suspend () -> Unit = { - //Breakpoint! - val a = 5 -} - -// PRINT_FRAME -// SHOW_KOTLIN_VARIABLES frame = invokeSuspend:9, HideContinuationThisKt$foo$1 {hideContinuationThis} local = result: java.lang.Object = {kotlin.Unit@uniqueID}kotlin.Unit (sp = null) - No fields to display diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/hideSyntheticThis.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/hideSyntheticThis.out index d6b078aaa58..84aa939489b 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/hideSyntheticThis.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/hideSyntheticThis.out @@ -2,22 +2,6 @@ LineBreakpoint created at hideSyntheticThis.kt:6 Run Java Connected to the target VM hideSyntheticThis.kt:6 -package hideSyntheticThis - -fun main() { - block("foo") { - //Breakpoint! - val b = 4 - } -} - -fun block(t: T, block: T.() -> Unit) { - t.block() -} - -// PRINT_FRAME -// SHOW_KOTLIN_VARIABLES -// DESCRIPTOR_VIEW_OPTIONS: NAME_EXPRESSION frame = invoke local = this (expression = this) field = value (expression = this.value) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/remapThis.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/remapThis.out index 15bf731bd0e..4cf575d4926 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/remapThis.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/remapThis.out @@ -2,26 +2,6 @@ LineBreakpoint created at remapThis.kt:14 Run Java Connected to the target VM remapThis.kt:14 -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 frame = foo this = this (@Bar) (expression = this) - diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/suspendContinuation.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/suspendContinuation.out index f61cdc9cb05..642be1cd097 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/suspendContinuation.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/suspendContinuation.out @@ -3,22 +3,6 @@ Run Java Connected to the target VM suspendContinuation.kt:7 Compile bytecode for a -package suspendContinuation - -suspend fun main() { - val a = 5 - foo() - //Breakpoint! - val b = 4 -} - -suspend fun foo() {} - -// PRINT_FRAME -// SHOW_KOTLIN_VARIABLES - -// EXPRESSION: a -// RESULT: 5: I frame = main:7, SuspendContinuationKt {suspendContinuation} local = $continuation: kotlin.coroutines.Continuation = {suspendContinuation.SuspendContinuationKt$main$1@uniqueID}Continuation at suspendContinuation.SuspendContinuationKt.main(suspendContinuation.kt:5) (sp = null) field = result: java.lang.Object = null (sp = null) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/destructuringParam.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/destructuringParam.out index 186f8fc2390..95ae8e3d9c1 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/destructuringParam.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/destructuringParam.out @@ -4,28 +4,6 @@ Connected to the target VM destructuringParam.kt:12 Compile bytecode for x Compile bytecode for y -package destructuringParam -data class A(val x: String, val y: String) - -fun foo(a: A, block: (A) -> String): String = block(a) - -fun box() { - -} - -fun main(args: Array) { - //Breakpoint! (lambdaOrdinal = 1) - foo(A("O", "K")) { (x, y) -> x + y } -} - -// PRINT_FRAME - -// EXPRESSION: x -// RESULT: "O": Ljava/lang/String; - -// EXPRESSION: y -// RESULT: "K": Ljava/lang/String; - frame = invoke:12, DestructuringParamKt$main$1 {destructuringParam} this = this = {destructuringParam.DestructuringParamKt$main$1@uniqueID}Function1 field = arity: int = 1 (sp = Lambda.!EXT!) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/underscoreNames.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/underscoreNames.out index aa10dec8f83..c3276a82729 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/underscoreNames.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/underscoreNames.out @@ -4,39 +4,6 @@ Connected to the target VM underscoreNames.kt:18 Compile bytecode for x Compile bytecode for y -package underscoreNames -data class A(val x: Double = 1.0, val y: String = "", val z: Char = '0') - -fun foo(a: A, block: (A, String, Int) -> String): String = block(a, "", 1) - -val arrayOfA: Array = Array(1) { A() } - -fun main(args: Array) { - - foo(A()) { - (x, _, y), _, w -> - - val (a, _, c) = A() - val (_, `_`, d) = A() - - for ((_, q) in arrayOfA) { - //Breakpoint! (lambdaOrdinal = 1) - println(q) - } - - "" - } -} - -// PRINT_FRAME - -// EXPRESSION: x -// RESULT: 1.0: D - -// EXPRESSION: y -// RESULT: 48: C - - Compile bytecode for arrayOfA frame = invoke:18, UnderscoreNamesKt$main$1 {underscoreNames} this = this = {underscoreNames.UnderscoreNamesKt$main$1@uniqueID}Function3 diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/renderer/toStringRenderer.out b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/renderer/toStringRenderer.out index 6f6e3a9290a..a08eb2fc0ed 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/renderer/toStringRenderer.out +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/renderer/toStringRenderer.out @@ -2,19 +2,6 @@ LineBreakpoint created at toStringRenderer.kt:6 Run Java Connected to the target VM toStringRenderer.kt:6 -package toStringRenderer - -fun main(args: Array) { - val a = A() - //Breakpoint! - args.size -} - -class A { - override fun toString() = "myA" -} - -// PRINT_FRAME Compile bytecode for args.size frame = main:6, ToStringRendererKt {toStringRenderer} local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = toStringRenderer.kt, 3) diff --git a/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/AbstractKotlinEvaluateExpressionTest.kt b/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/AbstractKotlinEvaluateExpressionTest.kt index 2f5fec5c678..8b7f7926fe6 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/AbstractKotlinEvaluateExpressionTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/AbstractKotlinEvaluateExpressionTest.kt @@ -106,12 +106,6 @@ abstract class AbstractKotlinEvaluateExpressionTest : KotlinDebuggerTestBase() { configureSettings(fileText) createAdditionalBreakpoints(fileText) - val shouldPrintFrame = isDirectiveDefined(fileText, "// PRINT_FRAME") - val skipInPrintFrame = if (shouldPrintFrame) findListWithPrefixes(fileText, "// SKIP: ") else emptyList() - val descriptorViewOptions = DescriptorViewOptions.valueOf(findStringWithPrefixes(fileText, "// DESCRIPTOR_VIEW_OPTIONS: ") ?: "FULL") - - ToggleKotlinVariablesState.getService().kotlinVariableView = isDirectiveDefined(fileText, "// SHOW_KOTLIN_VARIABLES") - val expressions = loadTestDirectivesPairs(fileText, "// EXPRESSION: ", "// RESULT: ") val blocks = findFilesWithBlocks(file).map { FileUtil.loadFile(it, true) } @@ -119,16 +113,10 @@ abstract class AbstractKotlinEvaluateExpressionTest : KotlinDebuggerTestBase() { createDebugProcess(path) + val printFrameHandler = PrintFrameHandler(fileText) + doStepping(path) - var variablesView: XVariablesView? = null - var watchesView: XWatchesViewImpl? = null - - ApplicationManager.getApplication().invokeAndWait({ - variablesView = createVariablesView() - watchesView = createWatchesView() - }, ModalityState.any()) - doOnBreakpoint { val exceptions = linkedMapOf() try { @@ -145,15 +133,8 @@ abstract class AbstractKotlinEvaluateExpressionTest : KotlinDebuggerTestBase() { evaluate(block, CodeFragmentKind.CODE_BLOCK, expectedBlockResults[i]) } } - } - finally { - if (shouldPrintFrame) { - printFrame(variablesView!!, watchesView!!, PrinterConfig(skipInPrintFrame, descriptorViewOptions)) - println(fileText, ProcessOutputTypes.SYSTEM) - } - else { - resume(this) - } + } finally { + printFrameHandler.trigger(this@doOnBreakpoint) } checkExceptions(exceptions) @@ -170,6 +151,8 @@ abstract class AbstractKotlinEvaluateExpressionTest : KotlinDebuggerTestBase() { createDebugProcess(path) + val printFrameHandler = PrintFrameHandler(fileText) + val expressions = loadTestDirectivesPairs(fileText, "// EXPRESSION: ", "// RESULT: ") val exceptions = linkedMapOf() @@ -178,19 +161,52 @@ abstract class AbstractKotlinEvaluateExpressionTest : KotlinDebuggerTestBase() { doOnBreakpoint { try { evaluate(expression, CodeFragmentKind.EXPRESSION, expected) - } - finally { - resume(this) + } finally { + printFrameHandler.trigger(this@doOnBreakpoint) } } } } checkExceptions(exceptions) - finish() } + private inner class PrintFrameHandler(fileText: String) { + private val shouldPrintFrame = isDirectiveDefined(fileText, "// PRINT_FRAME") + private val skipInPrintFrame = if (shouldPrintFrame) findListWithPrefixes(fileText, "// SKIP: ") else emptyList() + private val descriptorViewOptions = + DescriptorViewOptions.valueOf(findStringWithPrefixes(fileText, "// DESCRIPTOR_VIEW_OPTIONS: ") ?: "FULL") + + private val kotlinVariablesState: ToggleKotlinVariablesState + private val oldKotlinVariablesState: Boolean + + private lateinit var variablesView: XVariablesView + private lateinit var watchesView: XWatchesViewImpl + + init { + ApplicationManager.getApplication().invokeAndWait( + { + variablesView = createVariablesView() + watchesView = createWatchesView() + }, ModalityState.any() + ) + + kotlinVariablesState = ToggleKotlinVariablesState.getService() + oldKotlinVariablesState = kotlinVariablesState.kotlinVariableView + + kotlinVariablesState.kotlinVariableView = isDirectiveDefined(fileText, "// SHOW_KOTLIN_VARIABLES") + } + + fun trigger(suspendContext: SuspendContextImpl) { + if (shouldPrintFrame) { + suspendContext.printFrame(variablesView, watchesView, PrinterConfig(skipInPrintFrame, descriptorViewOptions)) + } else { + resume(suspendContext) + } + } + } + private fun createWatchesView(): XWatchesViewImpl { val session = myDebuggerSession.xDebugSession as XDebugSessionImpl val watchesView = XWatchesViewImpl(session, false)