Change the way 'step over' over inline calls works (KT-13751)

Previously it worked by invoking 'Run To Cursor' for the last position of inline function. As there's only one 'run to cursor' breakpoint
available in Idea framework, it couldn't work when inline function call was was used in conditions of control flow statements.

A new approach works through multiple step over operation and controlling stop position. In other words we try to "step over" inlined lines.
Same thing is actually done in "Smart Step Into" action.

(cherry picked from commit 2e8775d)

 #KT-13751 Fixed
This commit is contained in:
Nikolay Krasko
2016-09-26 15:14:54 +03:00
committed by Nikolay Krasko
parent 9594316b0a
commit 7992df7b93
49 changed files with 1004 additions and 322 deletions
@@ -0,0 +1,8 @@
LineBreakpoint created at inlineInIfFalse.kt:6
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! inlineInIfFalse.InlineInIfFalseKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
inlineInIfFalse.kt:6
inlineInIfFalse.kt:9
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,8 @@
LineBreakpoint created at inlineInIfTrue.kt:6
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! inlineInIfTrue.InlineInIfTrueKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
inlineInIfTrue.kt:6
inlineInIfTrue.kt:7
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,10 @@
LineBreakpoint created at soInlineAnonymousFunctionArgument.kt:5
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! soInlineAnonymousFunctionArgument.SoInlineAnonymousFunctionArgumentKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
soInlineAnonymousFunctionArgument.kt:5
soInlineAnonymousFunctionArgument.kt:7
soInlineAnonymousFunctionArgument.kt:11
soInlineAnonymousFunctionArgument.kt:12
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,9 @@
LineBreakpoint created at soInlineCallInLastStatementInInline.kt:9
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! soInlineCallInLastStatementInInline.SoInlineCallInLastStatementInInlineKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
soInlineCallInLastStatementInInline.kt:9
soInlineCallInLastStatementInInline.kt:10
soInlineCallInLastStatementInInline.kt:5
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,9 @@
LineBreakpoint created at soInlineCallInLastStatementInInlineInInline.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 !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! soInlineCallInLastStatementInInlineInInline.SoInlineCallInLastStatementInInlineInInlineKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
soInlineCallInLastStatementInInlineInInline.kt:15
soInlineCallInLastStatementInInlineInInline.kt:5
soInlineCallInLastStatementInInlineInInline.kt:6
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,9 @@
LineBreakpoint created at soInlineFunCallInLastStatementOfInlineWithArgumentFromCalleeAndOwn.kt:11 lambdaOrdinal = -1
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! soInlineFunCallInLastStatementOfInlineWithArgumentFromCalleeAndOwn.SoInlineFunCallInLastStatementOfInlineWithArgumentFromCalleeAndOwnKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
soInlineFunCallInLastStatementOfInlineWithArgumentFromCalleeAndOwn.kt:11
soInlineFunCallInLastStatementOfInlineWithArgumentFromCalleeAndOwn.kt:7
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,8 @@
LineBreakpoint created at soInlineFunWithLastStatementMultilineArgumentCall.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 !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! soInlineFunWithLastStatementMultilineArgumentCall.SoInlineFunWithLastStatementMultilineArgumentCallKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
soInlineFunWithLastStatementMultilineArgumentCall.kt:14
soInlineFunWithLastStatementMultilineArgumentCall.kt:9
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,9 @@
LineBreakpoint created at soInlineFunWithLastStatementOneLineArgumentCall.kt:11
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! soInlineFunWithLastStatementOneLineArgumentCall.SoInlineFunWithLastStatementOneLineArgumentCallKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
soInlineFunWithLastStatementOneLineArgumentCall.kt:11
soInlineFunWithLastStatementOneLineArgumentCall.kt:6
soInlineFunWithLastStatementOneLineArgumentCall.kt:7
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,10 @@
LineBreakpoint created at soInlineIfConditionLambdaFalse.kt:11
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! soInlineIfConditionLambdaFalse.SoInlineIfConditionLambdaFalseKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
soInlineIfConditionLambdaFalse.kt:11
soInlineIfConditionLambdaFalse.kt:15
soInlineIfConditionLambdaFalse.kt:18
soInlineIfConditionLambdaFalse.kt:7
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,10 @@
LineBreakpoint created at soInlineIfConditionLambdaTrue.kt:11
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! soInlineIfConditionLambdaTrue.SoInlineIfConditionLambdaTrueKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
soInlineIfConditionLambdaTrue.kt:11
soInlineIfConditionLambdaTrue.kt:12
soInlineIfConditionLambdaTrue.kt:18
soInlineIfConditionLambdaTrue.kt:7
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,12 @@
LineBreakpoint created at soInlineWhileCondition.kt:5
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! soInlineWhileCondition.SoInlineWhileConditionKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
soInlineWhileCondition.kt:5
soInlineWhileCondition.kt:7
soInlineWhileCondition.kt:8
soInlineWhileCondition.kt:7
soInlineWhileCondition.kt:12
soInlineWhileCondition.kt:15
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,8 @@
LineBreakpoint created at soReifiedInlineIfConditionFalse.kt:6
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! soReifiedInlineIfConditionFalse.SoReifiedInlineIfConditionFalseKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
soReifiedInlineIfConditionFalse.kt:6
soReifiedInlineIfConditionFalse.kt:9
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,8 @@
LineBreakpoint created at soSimpleInlineIfCondition.kt:5
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! soSimpleInlineIfCondition.SoSimpleInlineIfConditionKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
soSimpleInlineIfCondition.kt:5
soSimpleInlineIfCondition.kt:8
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,8 @@
LineBreakpoint created at stepOverDeclarationInInlineFun.kt:9
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! stepOverDeclarationInInlineFun.StepOverDeclarationInInlineFunKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
stepOverDeclarationInInlineFun.kt:9
stepOverDeclarationInInlineFun.kt:10
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -9,23 +9,14 @@ stepOverIfWithInline.kt:15
stepOverIfWithInline.kt:18
stepOverIfWithInline.kt:15
stepOverIfWithInline.kt:21
stepOverIfWithInline.kt:46
stepOverIfWithInline.kt:21
stepOverIfWithInline.kt:24
stepOverIfWithInline.kt:25
stepOverIfWithInline.kt:24
stepOverIfWithInline.kt:28
stepOverIfWithInline.kt:46
stepOverIfWithInline.kt:28
stepOverIfWithInline.kt:32
stepOverIfWithInline.kt:46
stepOverIfWithInline.kt:32
stepOverIfWithInline.kt:36
stepOverIfWithInline.kt:32
stepOverIfWithInline.kt:40
stepOverIfWithInline.kt:53
stepOverIfWithInline.kt:54
stepOverIfWithInline.kt:43
stepOverIfWithInline.kt:38
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -1,6 +1,7 @@
LineBreakpoint created at stepOverInlinedLambda.kt:6
LineBreakpoint created at stepOverInlinedLambda.kt:5
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! stepOverInlinedLambda.StepOverInlinedLambdaKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
stepOverInlinedLambda.kt:5
stepOverInlinedLambda.kt:6
stepOverInlinedLambda.kt:7
stepOverInlinedLambda.kt:10
@@ -11,8 +12,7 @@ stepOverInlinedLambda.kt:19
stepOverInlinedLambda.kt:20
stepOverInlinedLambda.kt:23
stepOverInlinedLambda.kt:29
stepOverInlinedLambda.kt:31
stepOverInlinedLambda.kt:32
stepOverInlinedLambda.kt:30
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -4,6 +4,7 @@ Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socke
stepOverInsideInlineFun.kt:11
stepOverInsideInlineFun.kt:12
stepOverInsideInlineFun.kt:13
stepOverInsideInlineFun.kt:14
stepOverInsideInlineFun.kt:7
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
@@ -11,7 +11,7 @@ stepOverNonLocalReturnInLambda.kt:35
stepOverNonLocalReturnInLambda.kt:7
stepOverNonLocalReturnInLambda.kt:52
stepOverNonLocalReturnInLambda.kt:53
stepOverNonLocalReturnInLambda.kt:10
stepOverNonLocalReturnInLambda.kt:9
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -4,21 +4,15 @@ Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socke
stepOverTryCatchWithInline.kt:14
stepOverTryCatchWithInline.kt:16
stepOverTryCatchWithInline.kt:17
stepOverTryCatchWithInline.kt:48
stepOverTryCatchWithInline.kt:17
stepOverTryCatchWithInline.kt:24
stepOverTryCatchWithInline.kt:25
stepOverTryCatchWithInline.kt:27
stepOverTryCatchWithInline.kt:28
stepOverTryCatchWithInline.kt:35
stepOverTryCatchWithInline.kt:36
stepOverTryCatchWithInline.kt:48
stepOverTryCatchWithInline.kt:36
stepOverTryCatchWithInline.kt:38
stepOverTryCatchWithInline.kt:39
stepOverTryCatchWithInline.kt:43
stepOverTryCatchWithInline.kt:48
stepOverTryCatchWithInline.kt:43
stepOverTryCatchWithInline.kt:7
stepOverTryCatchWithInline.kt:8
stepOverTryCatchWithInline.kt:10
@@ -3,8 +3,6 @@ LineBreakpoint created at stepOverWhenInReturn.kt:10
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
stepOverWhenInReturn.kt:10
stepOverWhenInReturn.kt:11
stepOverWhenInReturn.kt:17
stepOverWhenInReturn.kt:11
stepOverWhenInReturn.kt:10
stepOverWhenInReturn.kt:4
stepOverWhenInReturn.kt:5
@@ -4,43 +4,29 @@ Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socke
stepOverWhenWithInline.kt:5
stepOverWhenWithInline.kt:8
stepOverWhenWithInline.kt:9
stepOverWhenWithInline.kt:83
stepOverWhenWithInline.kt:9
stepOverWhenWithInline.kt:7
stepOverWhenWithInline.kt:14
stepOverWhenWithInline.kt:17
stepOverWhenWithInline.kt:18
stepOverWhenWithInline.kt:13
stepOverWhenWithInline.kt:26
stepOverWhenWithInline.kt:83
stepOverWhenWithInline.kt:26
stepOverWhenWithInline.kt:27
stepOverWhenWithInline.kt:83
stepOverWhenWithInline.kt:27
stepOverWhenWithInline.kt:25
stepOverWhenWithInline.kt:32
stepOverWhenWithInline.kt:34
stepOverWhenWithInline.kt:83
stepOverWhenWithInline.kt:34
stepOverWhenWithInline.kt:32
stepOverWhenWithInline.kt:38
stepOverWhenWithInline.kt:43
stepOverWhenWithInline.kt:38
stepOverWhenWithInline.kt:51
stepOverWhenWithInline.kt:52
stepOverWhenWithInline.kt:83
stepOverWhenWithInline.kt:52
stepOverWhenWithInline.kt:51
stepOverWhenWithInline.kt:58
stepOverWhenWithInline.kt:83
stepOverWhenWithInline.kt:58
stepOverWhenWithInline.kt:57
stepOverWhenWithInline.kt:64
stepOverWhenWithInline.kt:65
stepOverWhenWithInline.kt:63
stepOverWhenWithInline.kt:76
stepOverWhenWithInline.kt:83
stepOverWhenWithInline.kt:76
stepOverWhenWithInline.kt:75
stepOverWhenWithInline.kt:80
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
@@ -5,8 +5,6 @@ stepOverWhileWithInline.kt:5
stepOverWhileWithInline.kt:7
stepOverWhileWithInline.kt:8
stepOverWhileWithInline.kt:9
stepOverWhileWithInline.kt:41
stepOverWhileWithInline.kt:9
stepOverWhileWithInline.kt:7
stepOverWhileWithInline.kt:13
stepOverWhileWithInline.kt:14
@@ -18,18 +16,7 @@ stepOverWhileWithInline.kt:21
stepOverWhileWithInline.kt:24
stepOverWhileWithInline.kt:25
stepOverWhileWithInline.kt:26
stepOverWhileWithInline.kt:28
stepOverWhileWithInline.kt:30
stepOverWhileWithInline.kt:41
stepOverWhileWithInline.kt:30
stepOverWhileWithInline.kt:31
stepOverWhileWithInline.kt:30
stepOverWhileWithInline.kt:41
stepOverWhileWithInline.kt:30
stepOverWhileWithInline.kt:35
stepOverWhileWithInline.kt:41
stepOverWhileWithInline.kt:35
stepOverWhileWithInline.kt:38
stepOverWhileWithInline.kt:27
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0