Debugger: Do not use expression code fragments for evaluator (KT-32736, KT-32741)

It seems like it doesn't make much sense to create expression code fragments.
People type statements or several expressions separated with a semicolon to a single-line expression line.
That is exactly what block code fragment was designed for.
This commit is contained in:
Yan Zhulanow
2019-10-10 21:26:26 +09:00
parent 39662c09e9
commit 716c9f79f7
7 changed files with 66 additions and 19 deletions
@@ -185,6 +185,11 @@ public class KotlinEvaluateExpressionTestGenerated extends AbstractKotlinEvaluat
runTest("idea/jvm-debugger/jvm-debugger-test/testData/evaluation/singleBreakpoint/funFromSuperClass.kt");
}
@TestMetadata("functionDeclaration.kt")
public void testFunctionDeclaration() throws Exception {
runTest("idea/jvm-debugger/jvm-debugger-test/testData/evaluation/singleBreakpoint/functionDeclaration.kt");
}
@TestMetadata("genericCrossinlineArgument.kt")
public void testGenericCrossinlineArgument() throws Exception {
runTest("idea/jvm-debugger/jvm-debugger-test/testData/evaluation/singleBreakpoint/genericCrossinlineArgument.kt");
@@ -400,6 +405,11 @@ public class KotlinEvaluateExpressionTestGenerated extends AbstractKotlinEvaluat
runTest("idea/jvm-debugger/jvm-debugger-test/testData/evaluation/singleBreakpoint/simple.kt");
}
@TestMetadata("statements.kt")
public void testStatements() throws Exception {
runTest("idea/jvm-debugger/jvm-debugger-test/testData/evaluation/singleBreakpoint/statements.kt");
}
@TestMetadata("staticField.kt")
public void testStaticField() throws Exception {
runTest("idea/jvm-debugger/jvm-debugger-test/testData/evaluation/singleBreakpoint/staticField.kt");
@@ -0,0 +1,9 @@
package functionDeclaration
fun main() {
//Breakpoint!
val a = 5
}
// EXPRESSION: fun foo() {}
// RESULT: VOID_VALUE
@@ -0,0 +1,8 @@
LineBreakpoint created at functionDeclaration.kt:5
Run Java
Connected to the target VM
functionDeclaration.kt:5
Compile bytecode for fun foo() {}
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,9 @@
package statements
fun main() {
//Breakpoint!
val a = 5
}
// EXPRESSION: val b = 1
// RESULT: VOID_VALUE
@@ -0,0 +1,8 @@
LineBreakpoint created at statements.kt:5
Run Java
Connected to the target VM
statements.kt:5
Compile bytecode for val b = 1
Disconnected from the target VM
Process finished with exit code 0