{"record":{"id":"754c3789d3dc0517","repo":"JetBrains/intellij-community","slug":"there-is-no-executable-code-at-0-1","errorCode":null,"errorMessage":"There is no executable code at {0}:{1}","messagePattern":"There is no executable code at (.+?):(.+?)","errorType":"exception","errorClass":"EvaluateException","httpStatus":null,"severity":"warning","filePath":"java/debugger/impl/src/com/intellij/debugger/engine/DebugProcessImpl.java","lineNumber":3040,"sourceCode":"\n  public @NotNull ResumeCommand createStepIntoCommand(SuspendContextImpl suspendContext, boolean ignoreFilters, final MethodFilter smartStepFilter,\n                                                      int stepSize) {\n    return new StepIntoCommand(suspendContext, ignoreFilters, smartStepFilter, stepSize);\n  }\n\n  public @NotNull ResumeCommand createRunToCursorCommand(SuspendContextImpl suspendContext,\n                                                         @NotNull XSourcePosition position,\n                                                         boolean ignoreBreakpoints)\n    throws EvaluateException {\n    RunToCursorCommand runToCursorCommand = new RunToCursorCommand(suspendContext, position, ignoreBreakpoints);\n    checkRunToCursorIsOk(position, runToCursorCommand);\n    return runToCursorCommand;\n  }\n\n  private void checkRunToCursorIsOk(@NotNull XSourcePosition position, RunToCursorCommand runToCursorCommand) throws EvaluateException {\n    if (runToCursorCommand.myRunToCursorBreakpoint == null) {\n      PsiFile psiFile = PsiManager.getInstance(project).findFile(position.getFile());\n      throw new EvaluateException(\n        JavaDebuggerBundle.message(\"error.running.to.cursor.no.executable.code\", psiFile != null ? psiFile.getName() : \"<No File>\",\n                                   position.getLine()), null);\n    }\n  }\n\n  public @NotNull DebuggerCommandImpl createFreezeThreadCommand(ThreadReferenceProxyImpl thread) {\n    return new FreezeThreadCommand(thread);\n  }\n\n  public @NotNull SuspendContextCommandImpl createResumeThreadCommand(SuspendContextImpl suspendContext, @NotNull ThreadReferenceProxyImpl thread) {\n    return new ResumeThreadCommand(suspendContext, thread);\n  }\n\n  public @NotNull SuspendContextCommandImpl createPopFrameCommand(DebuggerContextImpl context, StackFrameProxyImpl stackFrame) {\n    return new PopFrameCommand(context, stackFrame);\n  }\n\n  //public void setBreakpointsMuted(final boolean muted) {","sourceCodeStart":3022,"sourceCodeEnd":3058,"githubUrl":"https://github.com/JetBrains/intellij-community/blob/be881553f2a76ac8b4ea53950d93f0de78295c19/java/debugger/impl/src/com/intellij/debugger/engine/DebugProcessImpl.java#L3022-L3058","documentation":"Thrown by createRunToCursorCommand when Run To Cursor is requested at a source position where no runnable bytecode exists, so no temporary breakpoint could be created. The debugger refuses the operation because resuming would never stop at the requested line.","triggerScenarios":"Invoking DebugProcessImpl.createRunToCursorCommand(suspendContext, position, ignoreBreakpoints) where position maps to a line with no executable code (comments, blank lines, method signatures, closing braces, or lines elided by the compiler such as constant-folded code); runToCursorCommand.myRunToCursorBreakpoint ends up null and checkRunToCursorIsOk throws EvaluateException.","commonSituations":"User presses Run to Cursor on a comment line, an empty line, a field declaration without initialization, or a line inside a dead/optimized-away branch; also on Kotlin/Scala lines that compile to no JVM bytecode at that position.","solutions":["Place the cursor on a line that contains an executable statement and retry Run To Cursor","Step over/into until reaching an executable line, then use Run To Cursor","Set a manual line breakpoint on a nearby executable line instead"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"XSourcePosition pos = editor.getCaretPosition();\nif (XDebuggerUtil.getInstance().isLineBreakpointAvailable(project, pos.getFile(), pos.getLine())) {\n  process.createRunToCursorCommand(suspendContext, pos, false);\n} else {\n  // notify user: no executable code at this line\n}","typeGuard":null,"tryCatchPattern":"try {\n  process.createRunToCursorCommand(ctx, position, ignore);\n} catch (EvaluateException e) {\n  // show 'no executable code' hint, keep the debugger suspended\n}","preventionTips":["Only invoke Run To Cursor on lines that contain executable statements","Check XDebuggerUtil.isLineBreakpointAvailable before creating run-to-cursor commands programmatically","Prefer stepping commands when unsure whether a line has bytecode"],"tags":["debugger","run-to-cursor","breakpoint","source-position"],"backgroundTag":null,"analyzedSha":"be881553f2a76ac8b4ea53950d93f0de78295c19","analyzedAt":"2026-08-14T14:13:06.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}