From b774540464ef15ec64018f389747eef8f1bd8c83 Mon Sep 17 00:00:00 2001 From: Dmitry Matveev Date: Mon, 6 Mar 2023 14:00:31 +0100 Subject: [PATCH] Feature Trainer. Proofread the 'Debug workflow' lesson GitOrigin-RevId: 822efa404a1b9c2f914ee7ecbbe3786c4bcdedcf --- .../messages/JavaLessonsBundle.properties | 11 +++-- .../res/messages/LessonsBundle.properties | 49 +++++++++---------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/java/java-features-trainer/resources/messages/JavaLessonsBundle.properties b/java/java-features-trainer/resources/messages/JavaLessonsBundle.properties index 1b634525b15b..375da272e550 100644 --- a/java/java-features-trainer/resources/messages/JavaLessonsBundle.properties +++ b/java/java-features-trainer/resources/messages/JavaLessonsBundle.properties @@ -157,10 +157,11 @@ java.find.help.link=Search for a target within a file java.debug.workflow.hotswap.disabled.warning=The Hot Swap feature is disabled in the IDE settings. \ Enable it in {0} | {1} | {2} \u2192 {3} or just click to activate. -java.debug.workflow.rebuild=For big programs, rerunning can take a long time. If you find and fix a mistake in a pure method, you can just rebuild \ - the project and apply the Hot Swap JVM feature. Let''s build the project: {0}. -java.debug.workflow.confirm.hot.swap=Confirm the Hot Swap replacement. +java.debug.workflow.rebuild=We could rerun our small program after the fix, but for big programs, rerunning can take a long time. \ + If the fix only affects a pure method (as in this case), we can rebuild the project and apply Hot Swap instead of rerunning. \ + Press {0} to build the project. +java.debug.workflow.confirm.hot.swap=Confirm the Hot Swap reload. java.debug.workflow.no.confirmation=Hot Swap is done automatically in the background. You may see a corresponding message in the lower-left corner. -java.debug.workflow.drop.frame=We patched our method, but right now we are still executing obsolete {0}, and it will throw the \ - exception again. Let''s drop the frame and return to the state before the {1} call. Click {2} near the top method in the stack frame or press {3}. +java.debug.workflow.drop.frame=We''ve patched our method, but we are still executing the obsolete {0}, which will throw the \ + exception again. Let''s drop the frame and return to the state before {1} was called. Click {2} near the top call in the stack frame or press {3}. java.debug.workflow.invalid.drop=It seems that you performed an action that was not planned by the lesson. Please, restart the lesson. diff --git a/plugins/ide-features-trainer/res/messages/LessonsBundle.properties b/plugins/ide-features-trainer/res/messages/LessonsBundle.properties index 9e00020e7ea4..6948c185ef20 100644 --- a/plugins/ide-features-trainer/res/messages/LessonsBundle.properties +++ b/plugins/ide-features-trainer/res/messages/LessonsBundle.properties @@ -380,35 +380,34 @@ run.configuration.help.link=Run/debug configurations debug.workflow.lesson.name=Debug workflow debug.workflow.frames.disabled.warning=To continue this lesson, enable {1} view in the Debug tool window. debug.workflow.incorrect.breakpoints=Breakpoints are set incorrectly for this lesson. -debug.workflow.run.current=Let's run this sample -debug.workflow.exception.description=We see an exception here. In the Run tool window you can see the stack trace. \ - Note, that the source code lines are clickable there, so you can navigate by it. -debug.workflow.toggle.breakpoint=Let''s start investigation by placing a breakpoint. \ - To set a breakpoint, you click the editor gutter or just press {0}. -debug.workflow.start.debug=To start debugging the selected run configuration, click {0} or press {1}. +debug.workflow.run.current=Let's run this sample program that calculates the average amount of different fruits from the input. +debug.workflow.exception.description=The program throws an exception, and you can see its stack trace in the Run window. \ + Note that you can click file names and line numbers in the stack trace to navigate to the editor. +debug.workflow.toggle.breakpoint=Let''s set a breakpoint to start investigating the problem. \ + To do so, click the gutter at the desired line or set the caret to that line and press {0}. +debug.workflow.start.debug=To start debugging with the currently selected run configuration, click {0} on the toolbar or press {1}. debug.workflow.need.restart.lesson=The debug session has been stopped. Restart the lesson. -debug.workflow.use.watches=There is a real exception. Let''s add this expression to {0}. This is to not evaluate it manually later. \ - Press {1} or click the {2} option. +debug.workflow.use.watches=Indeed, this expression results in an exception. Let''s add this expression to {0} so that it evaluates automatically in the future. \ + Press {1} or click {2}. debug.workflow.use.watches.shortcut=Alternatively, you can use action {0} to add the selected text to {1} {2}. debug.workflow.consider.to.add.a.shortcut=(consider assigning a shortcut for it later) -debug.workflow.step.into=Let''s step into. You can use the {0} action or the {1} option on the debug panel. -debug.workflow.choose.method.to.step.in=In most cases, you might want to skip argument calculating, so the Smart Step Into feature suggests \ - the wrapping method by default. However, here we need to choose the second one: {0}. \ - You can choose it with the keyboard {1} and press {2}, or you can click the call. -debug.workflow.quick.evaluate=Let''s see what we are going to pass to {0}. Invoke Quick Evaluate Expression {1} for the selected argument. -debug.workflow.fix.error=Oh, we made a mistake in the array index! Let''s fix it right now. Close the ({0}) popup and change 0 to 1. -debug.workflow.step.over=Let''s check if the call of {0} will not throw an exception now. Use the Step Over action {1} or click the {2} option. -debug.workflow.mute.breakpoints=Oops, the same breakpoint again. Now we don''t need to stop at this breakpoint. \ - So, let''s mute breakpoints by clicking the {0} option or with the {1} action. -debug.workflow.run.to.cursor.intro=Let''s check the result of {0}. We''ve moved the editor cursor to the {1} statement. -debug.workflow.run.to.cursor.press=Press {0}. -debug.workflow.run.to.cursor.press.or.click=Press {0} or click {1}. -debug.workflow.evaluate.expression=It seems that the exception is thrown as the result of the selected function call. Let's evaluate it to check the guess. \ - Copy the selected expression and paste it into the highlighted text field. +debug.workflow.step.into=To find out what caused the exception, let''s step into the selected call. Pres {0} or click {1} in the Debug window. +debug.workflow.choose.method.to.step.in=Note that there are several nested calls, and Smart Step Into highlights all of them. \ + Press {1} to choose the {0} call and then press {2} to step into it. +debug.workflow.quick.evaluate=Let''s see what we are going to pass to {0}. Press {1} to invoke Quick Evaluate Expression for the selected argument. +debug.workflow.fix.error=Oh, there is a mistake in the array index! Let''s fix it right now. Press {0} to close the popup, and then change 0 to 1. +debug.workflow.step.over=Let''s check whether calling {0} will throw an exception after our fix. To step over the call, press {1} or click {2} in the Debug window. +debug.workflow.mute.breakpoints=Oops, our breakpoint is hit again, but we don''t have to stop here this time. \ + Let''s mute breakpoints by pressing {1} or by clicking {0} in the Debug window. +debug.workflow.run.to.cursor.intro=Finally, let''s check the result of {0} (for your convenience we''ve moved the caret to its {1} statement). +debug.workflow.run.to.cursor.press=Press {0} to execute the program up to the line where the caret is. +debug.workflow.run.to.cursor.press.or.click=Press {0} to execute the program up to the line where the caret is, or click {1}. +debug.workflow.evaluate.expression=To check whether a function throws an exception, you can evaluate an expression that calls this function. \ + Let's copy the selected expression and paste it into the highlighted field in the Debug window. debug.workflow.evaluate.it=Press {0} to evaluate the expression. -debug.workflow.check.result=Press {0} to evaluate the result of the function. -debug.workflow.stop.debug=The result is correct! Let''s finish debugging with {0} or the {1} button. -debug.workflow.resume=It seems there are no exceptions by now. Let''s continue execution with {0} or by clicking the {1} button. +debug.workflow.check.result=Press {0} to evaluate the selected return statement. +debug.workflow.stop.debug=The result is correct! Let''s finish debugging by pressing {0} or clicking {1} on the toolbar. +debug.workflow.resume=The call works without exceptions now. Press {0} or click {1} in the Debug window to resume program execution. # Link name to the IDE help debug.workflow.help.link=Debug code