diff --git a/idea/src/org/jetbrains/jet/plugin/debugger/evaluate/KotlinEvaluationBuilder.kt b/idea/src/org/jetbrains/jet/plugin/debugger/evaluate/KotlinEvaluationBuilder.kt index a124faed692..7e8124b5658 100644 --- a/idea/src/org/jetbrains/jet/plugin/debugger/evaluate/KotlinEvaluationBuilder.kt +++ b/idea/src/org/jetbrains/jet/plugin/debugger/evaluate/KotlinEvaluationBuilder.kt @@ -161,12 +161,12 @@ class KotlinEvaluator(val codeFragment: JetCodeFragment, private fun JetNamedFunction.getParameterNamesForDebugger(): List { val result = arrayListOf() - for (param in getValueParameters()) { - result.add(param.getName()!!) - } if (getReceiverTypeRef() != null) { result.add("this") } + for (param in getValueParameters()) { + result.add(param.getName()!!) + } return result } diff --git a/idea/testData/debugger/tinyApp/outs/extractThis.out b/idea/testData/debugger/tinyApp/outs/extractThis.out index f337859bcc6..f308e1f8a66 100644 --- a/idea/testData/debugger/tinyApp/outs/extractThis.out +++ b/idea/testData/debugger/tinyApp/outs/extractThis.out @@ -1,7 +1,7 @@ -LineBreakpoint created at extractThis.kt:12 +LineBreakpoint created at extractThis.kt:13 !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!;!RT_JAR! extractThis.ExtractThisPackage Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket' -extractThis.kt:11 +extractThis.kt:12 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/src/evaluate/extractThis.kt b/idea/testData/debugger/tinyApp/src/evaluate/extractThis.kt index 488a39c173c..da22f846b68 100644 --- a/idea/testData/debugger/tinyApp/src/evaluate/extractThis.kt +++ b/idea/testData/debugger/tinyApp/src/evaluate/extractThis.kt @@ -8,8 +8,9 @@ class MyClass { val prop = 1 fun test() { - //Breakpoint! val a = 1 + //Breakpoint! + val b = 1 } } @@ -17,4 +18,7 @@ class MyClass { // RESULT: 1: I // EXPRESSION: this.prop -// RESULT: 1: I \ No newline at end of file +// RESULT: 1: I + +// EXPRESSION: prop + a +// RESULT: 2: I \ No newline at end of file