diff --git a/idea/src/org/jetbrains/kotlin/idea/debugger/evaluate/KotlinEvaluationBuilder.kt b/idea/src/org/jetbrains/kotlin/idea/debugger/evaluate/KotlinEvaluationBuilder.kt index 67e855978dd..485bdddc058 100644 --- a/idea/src/org/jetbrains/kotlin/idea/debugger/evaluate/KotlinEvaluationBuilder.kt +++ b/idea/src/org/jetbrains/kotlin/idea/debugger/evaluate/KotlinEvaluationBuilder.kt @@ -409,15 +409,17 @@ fun EvaluationContextImpl.findLocalVariable(name: String, asmType: Type?, checkT if (`$this` != null) return `$this` } else -> { - val eval4j = JDIEval(frame.virtualMachine()!!, - getClassLoader()!!, - getSuspendContext().getThread()?.getThreadReference()!!, - getSuspendContext().getInvokePolicy()) - fun JDIEval.getField(owner: Value, name: String, asmType: Type?, checkType: Boolean): Value? { - val fieldDescription = FieldDescription(owner.asmType.getInternalName(), name, asmType?.getDescriptor() ?: "", isStatic = false) + fun getField(owner: Value, name: String, asmType: Type?, checkType: Boolean): Value? { try { - val fieldValue = getField(owner, fieldDescription) + val obj = owner.asJdiValue(frame.virtualMachine(), owner.asmType) + if (obj !is ObjectReference) return null + + val _class = obj.referenceType() + val field = _class.fieldByName(name) + if (field == null) return null + + val fieldValue = obj.getValue(field).asValue() if (isValueOfCorrectType(fieldValue, asmType, checkType)) return fieldValue return null } @@ -430,8 +432,8 @@ fun EvaluationContextImpl.findLocalVariable(name: String, asmType: Type?, checkT return expectedType != null && this.asmType == StackValue.sharedTypeForType(expectedType) } - fun JDIEval.getValueForSharedVar(value: Value, expectedType: Type?, checkType: Boolean): Value? { - val sharedVarValue = this.getField(value, "element", expectedType, checkType) + fun getValueForSharedVar(value: Value, expectedType: Type?, checkType: Boolean): Value? { + val sharedVarValue = getField(value, "element", expectedType, checkType) if (sharedVarValue != null && isValueOfCorrectType(sharedVarValue, expectedType, checkType)) { return sharedVarValue } @@ -442,7 +444,7 @@ fun EvaluationContextImpl.findLocalVariable(name: String, asmType: Type?, checkT if (localVariable != null) { val eval4jValue = frame.getValue(localVariable).asValue() if (eval4jValue.isSharedVar(asmType)) { - val sharedVarValue = eval4j.getValueForSharedVar(eval4jValue, asmType, checkType) + val sharedVarValue = getValueForSharedVar(eval4jValue, asmType, checkType) if (sharedVarValue != null) { return sharedVarValue } @@ -457,9 +459,9 @@ fun EvaluationContextImpl.findLocalVariable(name: String, asmType: Type?, checkT var thisObj: Value? = thisObject.asValue() while (result == null && thisObj != null) { - result = eval4j.getField(thisObj!!, name, asmType, checkType) + result = getField(thisObj!!, name, asmType, checkType) if (result == null) { - thisObj = eval4j.getField(thisObj!!, AsmUtil.CAPTURED_THIS_FIELD, null, false) + thisObj = getField(thisObj!!, AsmUtil.CAPTURED_THIS_FIELD, null, false) } } return result @@ -469,7 +471,7 @@ fun EvaluationContextImpl.findLocalVariable(name: String, asmType: Type?, checkT val capturedVal = findCapturedVal(capturedValName) if (capturedVal != null) { if (capturedVal.isSharedVar(asmType)) { - val sharedVarValue = eval4j.getValueForSharedVar(capturedVal, asmType, checkType) + val sharedVarValue = getValueForSharedVar(capturedVal, asmType, checkType) if (sharedVarValue != null) { return sharedVarValue } diff --git a/idea/testData/debugger/tinyApp/outs/frameClassObject.out b/idea/testData/debugger/tinyApp/outs/frameClassObject.out index 14e4d64e233..09c50e6552b 100644 --- a/idea/testData/debugger/tinyApp/outs/frameClassObject.out +++ b/idea/testData/debugger/tinyApp/outs/frameClassObject.out @@ -1,8 +1,9 @@ -LineBreakpoint created at frameClassObject.kt:15 +LineBreakpoint created at frameClassObject.kt:16 !JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !APP_PATH!\classes;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! frameClassObject.FrameClassObjectPackage Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket' -frameClassObject.kt:15 +frameClassObject.kt:16 Compile bytecode for prop +Compile bytecode for myFun() package frameClassObject fun main(args: Array) { @@ -12,6 +13,7 @@ fun main(args: Array) { class A { class object { val prop = 1 + fun myFun() = 1 } fun test() { @@ -30,7 +32,10 @@ fun foo(f: () -> Unit) { // EXPRESSION: prop // RESULT: 1: I - frame = invoke():15, A$test$1 {frameClassObject} + +// EXPRESSION: myFun() +// RESULT: 1: I + frame = invoke():16, A$test$1 {frameClassObject} this = this = {frameClassObject.A$test$1@uniqueID}kotlin.Function0 Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket' diff --git a/idea/testData/debugger/tinyApp/outs/frameExtFunExtFun.out b/idea/testData/debugger/tinyApp/outs/frameExtFunExtFun.out index adc14178b51..8ccac44f394 100644 --- a/idea/testData/debugger/tinyApp/outs/frameExtFunExtFun.out +++ b/idea/testData/debugger/tinyApp/outs/frameExtFunExtFun.out @@ -1,12 +1,15 @@ -LineBreakpoint created at frameExtFunExtFun.kt:22 +LineBreakpoint created at frameExtFunExtFun.kt:24 !JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !APP_PATH!\classes;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! frameExtFunExtFun.FrameExtFunExtFunPackage Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket' -frameExtFunExtFun.kt:22 +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() package frameExtFunExtFun fun main(args: Array) { @@ -15,10 +18,12 @@ fun main(args: Array) { class A { val aProp = 1 + fun aMyFun() = 1 } class Outer { val outerProp = 1 + fun outerMyFun() = 1 fun A.foo() { val valFoo = 1 @@ -46,6 +51,7 @@ class Outer { class B { val bProp = 1 + fun bMyFun() = 1 } fun lambda(f: () -> Unit) { @@ -68,17 +74,26 @@ fun lambda(f: () -> Unit) { // EXPRESSION: bProp // RESULT: 1: I - frame = invoke():22, Outer$foo$LocalClass$test$1 {frameExtFunExtFun} + +// 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}kotlin.Function0 field = this$0: frameExtFunExtFun.Outer$foo$LocalClass = {frameExtFunExtFun.Outer$foo$LocalClass@uniqueID} (sp = null) - field = lcProp: int = 1 (sp = frameExtFunExtFun.kt, 17) + 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, 12) + field = outerProp: int = 1 (sp = frameExtFunExtFun.kt, 13) field = receiver$0: frameExtFunExtFun.A = {frameExtFunExtFun.A@uniqueID} (sp = null) field = aProp: int = 1 (sp = frameExtFunExtFun.kt, 8) field = $valFoo: int = 1 (sp = null) field = receiver$0: frameExtFunExtFun.B = {frameExtFunExtFun.B@uniqueID} (sp = null) - field = bProp: int = 1 (sp = frameExtFunExtFun.kt, 39) + field = bProp: int = 1 (sp = frameExtFunExtFun.kt, 41) field = $valTest: int = 1 (sp = null) Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket' diff --git a/idea/testData/debugger/tinyApp/outs/frameExtensionFun.out b/idea/testData/debugger/tinyApp/outs/frameExtensionFun.out index 057cf614332..0dfca25bb98 100644 --- a/idea/testData/debugger/tinyApp/outs/frameExtensionFun.out +++ b/idea/testData/debugger/tinyApp/outs/frameExtensionFun.out @@ -1,8 +1,9 @@ -LineBreakpoint created at frameExtensionFun.kt:13 +LineBreakpoint created at frameExtensionFun.kt:14 !JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !APP_PATH!\classes;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! frameExtensionFun.FrameExtensionFunPackage Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket' -frameExtensionFun.kt:13 +frameExtensionFun.kt:14 Compile bytecode for prop +Compile bytecode for myFun() package frameExtensionFun fun main(args: Array) { @@ -11,6 +12,7 @@ fun main(args: Array) { class A { val prop = 1 + fun myFun() = 1 } fun A.foo() { @@ -22,7 +24,10 @@ fun A.foo() { // EXPRESSION: prop // RESULT: 1: I - frame = foo():13, FrameExtensionFunPackage$@packagePartHASH {frameExtensionFun} + +// EXPRESSION: myFun() +// RESULT: 1: I + frame = foo():14, FrameExtensionFunPackage$@packagePartHASH {frameExtensionFun} static = static = frameExtensionFun.FrameExtensionFunPackage$@packagePartHASH local = $receiver: frameExtensionFun.A = {frameExtensionFun.A@uniqueID} (sp = null) field = prop: int = 1 (sp = frameExtensionFun.kt, 8) diff --git a/idea/testData/debugger/tinyApp/outs/frameInnerClass.out b/idea/testData/debugger/tinyApp/outs/frameInnerClass.out index c18d338c35f..422c5c18c81 100644 --- a/idea/testData/debugger/tinyApp/outs/frameInnerClass.out +++ b/idea/testData/debugger/tinyApp/outs/frameInnerClass.out @@ -1,9 +1,11 @@ -LineBreakpoint created at frameInnerClass.kt:15 +LineBreakpoint created at frameInnerClass.kt:17 !JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !APP_PATH!\classes;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! frameInnerClass.FrameInnerClassPackage Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket' -frameInnerClass.kt:15 +frameInnerClass.kt:17 Compile bytecode for prop1 Compile bytecode for prop2 +Compile bytecode for myFun1() +Compile bytecode for myFun2() package frameInnerClass fun main(args: Array) { @@ -12,9 +14,11 @@ fun main(args: Array) { class A { val prop1 = 1 + fun myFun1() = 1 inner class Inner { val prop2 = 1 + fun myFun2() = 1 fun test() { //Breakpoint! @@ -30,9 +34,15 @@ class A { // EXPRESSION: prop2 // RESULT: 1: I - frame = test():15, A$Inner {frameInnerClass} + +// 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, 11) + 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, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket' diff --git a/idea/testData/debugger/tinyApp/outs/frameObject.out b/idea/testData/debugger/tinyApp/outs/frameObject.out index eb47c2bce9a..5d10453fbea 100644 --- a/idea/testData/debugger/tinyApp/outs/frameObject.out +++ b/idea/testData/debugger/tinyApp/outs/frameObject.out @@ -3,6 +3,7 @@ LineBreakpoint created at frameObject.kt:6 Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket' frameObject.kt:6 Compile bytecode for O.obProp +Compile bytecode for O.obMyFun() package frameObject fun main(args: Array) { @@ -14,6 +15,7 @@ fun main(args: Array) { object O { val obProp = 1 + fun obMyFun() = 1 } fun foo(f: () -> Unit) { @@ -23,6 +25,9 @@ fun foo(f: () -> Unit) { // PRINT_FRAME // EXPRESSION: O.obProp +// RESULT: 1: I + +// EXPRESSION: O.obMyFun() // RESULT: 1: I frame = invoke():6, FrameObjectPackage$@packagePartHASH$main$1 {frameObject} this = this = {frameObject.FrameObjectPackage$@packagePartHASH$main$1@uniqueID}kotlin.Function0 diff --git a/idea/testData/debugger/tinyApp/outs/frameThis0.out b/idea/testData/debugger/tinyApp/outs/frameThis0.out index cafd9dc3165..bbdade53727 100644 --- a/idea/testData/debugger/tinyApp/outs/frameThis0.out +++ b/idea/testData/debugger/tinyApp/outs/frameThis0.out @@ -1,11 +1,12 @@ -LineBreakpoint created at frameThis0.kt:15 +LineBreakpoint created at frameThis0.kt:16 !JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !APP_PATH!\classes;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! frameThis0.FrameThis0Package Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket' -frameThis0.kt:15 +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() package frameThis0 fun main(args: Array) { @@ -14,6 +15,7 @@ fun main(args: Array) { class A { val prop1 = 1 + fun myFun() = 1 fun test() { val val1 = 1 @@ -42,12 +44,15 @@ fun foo(f: () -> Unit) { // EXPRESSION: prop1 + val1 + val2 // RESULT: 3: I - frame = invoke():15, A$test$1 {frameThis0} + +// EXPRESSION: myFun() +// RESULT: 1: I + frame = invoke():16, A$test$1 {frameThis0} this = this = {frameThis0.A$test$1@uniqueID}kotlin.Function0 field = this$0: frameThis0.A = {frameThis0.A@uniqueID} (sp = null) field = prop1: int = 1 (sp = frameThis0.kt, 8) field = $val1: int = 1 (sp = null) - local = val2: int = 1 (sp = frameThis0.kt, 13) + local = val2: int = 1 (sp = frameThis0.kt, 14) Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket' Process finished with exit code 0 diff --git a/idea/testData/debugger/tinyApp/outs/frameThis0Ext.out b/idea/testData/debugger/tinyApp/outs/frameThis0Ext.out index 6b5a2de97fa..3cd6adc3028 100644 --- a/idea/testData/debugger/tinyApp/outs/frameThis0Ext.out +++ b/idea/testData/debugger/tinyApp/outs/frameThis0Ext.out @@ -1,12 +1,14 @@ -LineBreakpoint created at frameThis0Ext.kt:14 +LineBreakpoint created at frameThis0Ext.kt:15 !JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !APP_PATH!\classes;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! frameThis0Ext.FrameThis0ExtPackage Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket' -frameThis0Ext.kt:14 +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() package frameThis0Ext fun main(args: Array) { @@ -15,6 +17,7 @@ fun main(args: Array) { class A { val prop1 = 1 + fun myFun1() = 1 fun AExt.testExt() { val val1 = 1 @@ -31,6 +34,7 @@ class A { class AExt { val prop2 = 1 + fun myFun2() = 1 } fun foo(f: () -> Unit) { @@ -53,12 +57,18 @@ fun foo(f: () -> Unit) { // EXPRESSION: prop2 + val1 // RESULT: 2: I - frame = invoke():14, A$testExt$1 {frameThis0Ext} + +// EXPRESSION: myFun1() +// RESULT: 1: I + +// EXPRESSION: myFun2() +// RESULT: 1: I + frame = invoke():15, A$testExt$1 {frameThis0Ext} this = this = {frameThis0Ext.A$testExt$1@uniqueID}kotlin.Function0 field = this$0: frameThis0Ext.A = {frameThis0Ext.A@uniqueID} (sp = null) field = prop1: int = 1 (sp = frameThis0Ext.kt, 8) field = receiver$0: frameThis0Ext.AExt = {frameThis0Ext.AExt@uniqueID} (sp = null) - field = prop2: int = 1 (sp = frameThis0Ext.kt, 24) + field = prop2: int = 1 (sp = frameThis0Ext.kt, 25) field = $val1: int = 1 (sp = null) Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket' diff --git a/idea/testData/debugger/tinyApp/outs/frameThis0This0.out b/idea/testData/debugger/tinyApp/outs/frameThis0This0.out index 0de3c095a12..8884228c3e2 100644 --- a/idea/testData/debugger/tinyApp/outs/frameThis0This0.out +++ b/idea/testData/debugger/tinyApp/outs/frameThis0This0.out @@ -1,11 +1,12 @@ -LineBreakpoint created at frameThis0This0.kt:16 +LineBreakpoint created at frameThis0This0.kt:17 !JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !APP_PATH!\classes;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! frameThis0This0.FrameThis0This0Package Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket' -frameThis0This0.kt:16 +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() package frameThis0This0 fun main(args: Array) { @@ -14,6 +15,7 @@ fun main(args: Array) { class A { val prop1 = 1 + fun myFun() = 1 fun test() { val val1 = 1 @@ -44,7 +46,10 @@ fun foo(f: () -> Unit) { // EXPRESSION: prop1 + val1 + val2 // RESULT: 3: I - frame = invoke():16, A$test$1$1 {frameThis0This0} + +// EXPRESSION: myFun() +// RESULT: 1: I + frame = invoke():17, A$test$1$1 {frameThis0This0} this = this = {frameThis0This0.A$test$1$1@uniqueID}kotlin.Function0 field = this$0: frameThis0This0.A$test$1 = {frameThis0This0.A$test$1@uniqueID}kotlin.Function0 (sp = null) field = this$0: frameThis0This0.A = {frameThis0This0.A@uniqueID} (sp = null) diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameClassObject.kt b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameClassObject.kt index 2a351b15070..d0765506d2d 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameClassObject.kt +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameClassObject.kt @@ -7,6 +7,7 @@ fun main(args: Array) { class A { class object { val prop = 1 + fun myFun() = 1 } fun test() { @@ -24,4 +25,7 @@ fun foo(f: () -> Unit) { // PRINT_FRAME // EXPRESSION: prop +// RESULT: 1: I + +// EXPRESSION: myFun() // RESULT: 1: I \ No newline at end of file diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameExtFunExtFun.kt b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameExtFunExtFun.kt index 3d0f5691cdd..d0afe2ff319 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameExtFunExtFun.kt +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameExtFunExtFun.kt @@ -6,10 +6,12 @@ fun main(args: Array) { class A { val aProp = 1 + fun aMyFun() = 1 } class Outer { val outerProp = 1 + fun outerMyFun() = 1 fun A.foo() { val valFoo = 1 @@ -37,6 +39,7 @@ class Outer { class B { val bProp = 1 + fun bMyFun() = 1 } fun lambda(f: () -> Unit) { @@ -58,4 +61,13 @@ fun lambda(f: () -> Unit) { // RESULT: 1: I // EXPRESSION: bProp +// RESULT: 1: I + +// EXPRESSION: aMyFun() +// RESULT: 1: I + +// EXPRESSION: outerMyFun() +// RESULT: 1: I + +// EXPRESSION: bMyFun() // RESULT: 1: I \ No newline at end of file diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameExtensionFun.kt b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameExtensionFun.kt index a4142f70096..20c9d66268f 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameExtensionFun.kt +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameExtensionFun.kt @@ -6,6 +6,7 @@ fun main(args: Array) { class A { val prop = 1 + fun myFun() = 1 } fun A.foo() { @@ -16,4 +17,7 @@ fun A.foo() { // PRINT_FRAME // EXPRESSION: prop +// RESULT: 1: I + +// EXPRESSION: myFun() // RESULT: 1: I \ No newline at end of file diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInnerClass.kt b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInnerClass.kt index 6aa4e1b3de6..9457f87b917 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInnerClass.kt +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInnerClass.kt @@ -6,9 +6,11 @@ fun main(args: Array) { class A { val prop1 = 1 + fun myFun1() = 1 inner class Inner { val prop2 = 1 + fun myFun2() = 1 fun test() { //Breakpoint! @@ -23,4 +25,10 @@ class A { // RESULT: 1: I // EXPRESSION: prop2 +// RESULT: 1: I + +// EXPRESSION: myFun1() +// RESULT: 1: I + +// EXPRESSION: myFun2() // RESULT: 1: I \ No newline at end of file diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameObject.kt b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameObject.kt index 55c232e6aab..aea3ee60f7f 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameObject.kt +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameObject.kt @@ -9,6 +9,7 @@ fun main(args: Array) { object O { val obProp = 1 + fun obMyFun() = 1 } fun foo(f: () -> Unit) { @@ -18,4 +19,7 @@ fun foo(f: () -> Unit) { // PRINT_FRAME // EXPRESSION: O.obProp +// RESULT: 1: I + +// EXPRESSION: O.obMyFun() // RESULT: 1: I \ No newline at end of file diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0.kt b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0.kt index 73367af12ad..950d370d05a 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0.kt +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0.kt @@ -6,6 +6,7 @@ fun main(args: Array) { class A { val prop1 = 1 + fun myFun() = 1 fun test() { val val1 = 1 @@ -33,4 +34,7 @@ fun foo(f: () -> Unit) { // RESULT: 1: I // EXPRESSION: prop1 + val1 + val2 -// RESULT: 3: I \ No newline at end of file +// RESULT: 3: I + +// EXPRESSION: myFun() +// RESULT: 1: I \ No newline at end of file diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0Ext.kt b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0Ext.kt index 15735ca555a..aa82e0e5c0b 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0Ext.kt +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0Ext.kt @@ -6,6 +6,7 @@ fun main(args: Array) { class A { val prop1 = 1 + fun myFun1() = 1 fun AExt.testExt() { val val1 = 1 @@ -22,6 +23,7 @@ class A { class AExt { val prop2 = 1 + fun myFun2() = 1 } fun foo(f: () -> Unit) { @@ -43,4 +45,10 @@ fun foo(f: () -> Unit) { // RESULT: 2: I // EXPRESSION: prop2 + val1 -// RESULT: 2: I \ No newline at end of file +// RESULT: 2: I + +// EXPRESSION: myFun1() +// RESULT: 1: I + +// EXPRESSION: myFun2() +// RESULT: 1: I \ No newline at end of file diff --git a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0This0.kt b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0This0.kt index 87f7357deb0..4dab762f370 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0This0.kt +++ b/idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0This0.kt @@ -6,6 +6,7 @@ fun main(args: Array) { class A { val prop1 = 1 + fun myFun() = 1 fun test() { val val1 = 1 @@ -35,4 +36,7 @@ fun foo(f: () -> Unit) { // RESULT: 1: I // EXPRESSION: prop1 + val1 + val2 -// RESULT: 3: I \ No newline at end of file +// RESULT: 3: I + +// EXPRESSION: myFun() +// RESULT: 1: I \ No newline at end of file