Commit ed807aac authored by Konstantin Hudyakov's avatar Konstantin Hudyakov Committed by intellij-monorepo-bot
Browse files

IFT-385 Adapt Debug lesson to new debugger layout

IJ-CR-27084

GitOrigin-RevId: d7470e10094efc6d41e1b4f503044b69df033db2
parent fcbd1a7e
Branches unavailable Tags unavailable
No related merge requests found
Showing with 16 additions and 9 deletions
+16 -9
......@@ -395,8 +395,10 @@ debug.workflow.fix.error=Oh, we made a mistake in the array index! Let''s fix it
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=Let''s check the result of {0}. We''ve moved the editor cursor to the {1} statement. \
Press {2} or click {3}. Alternatively, click the line number. Note that {4} works even if breakpoints are muted.
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.run.to.cursor.alternative=Alternatively, click the line number. Note that {0} works even if breakpoints are muted.
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.evaluate.it=Press {0} to evaluate the expression.
......
......@@ -5,6 +5,7 @@ import com.intellij.execution.RunManager
import com.intellij.execution.RunManagerListener
import com.intellij.execution.RunnerAndConfigurationSettings
import com.intellij.execution.actions.ConfigurationContext
import com.intellij.execution.ui.UIExperiment
import com.intellij.icons.AllIcons
import com.intellij.ide.impl.DataManagerImpl
import com.intellij.idea.ActionsBundle
......@@ -343,18 +344,22 @@ abstract class CommonDebugLesson(id: String) : KLesson(id, LessonsBundle.message
caret(position)
highlightLineNumberByOffset(position.startOffset)
highlightButtonById("RunToCursor", clearHighlights = false)
if (!UIExperiment.isNewDebuggerUIEnabled()) {
highlightButtonById("RunToCursor", clearHighlights = false)
}
else task { }
actionTask("RunToCursor") {
proposeRestore {
checkPositionOfEditor(LessonSample(afterFixText, position))
}
LessonsBundle.message("debug.workflow.run.to.cursor",
code(debuggingMethodName),
code("return"),
action(it),
icon(AllIcons.Actions.RunToCursor),
LessonUtil.actionName(it))
val intro = LessonsBundle.message("debug.workflow.run.to.cursor.intro", code(debuggingMethodName), code("return"))
val actionPart = if (!UIExperiment.isNewDebuggerUIEnabled()) {
LessonsBundle.message("debug.workflow.run.to.cursor.press", action(it), icon(AllIcons.Actions.RunToCursor))
}
else LessonsBundle.message("debug.workflow.run.to.cursor.press", action(it))
val alternative = LessonsBundle.message("debug.workflow.run.to.cursor.alternative", LessonUtil.actionName(it))
"$intro $actionPart $alternative"
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment