JetBrains/intellij-community · warning · EvaluateException

There is no executable code at {0}:{1}

Error message

There is no executable code at {0}:{1}

What it means

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.

Source

Thrown at java/debugger/impl/src/com/intellij/debugger/engine/DebugProcessImpl.java:3040

  public @NotNull ResumeCommand createStepIntoCommand(SuspendContextImpl suspendContext, boolean ignoreFilters, final MethodFilter smartStepFilter,
                                                      int stepSize) {
    return new StepIntoCommand(suspendContext, ignoreFilters, smartStepFilter, stepSize);
  }

  public @NotNull ResumeCommand createRunToCursorCommand(SuspendContextImpl suspendContext,
                                                         @NotNull XSourcePosition position,
                                                         boolean ignoreBreakpoints)
    throws EvaluateException {
    RunToCursorCommand runToCursorCommand = new RunToCursorCommand(suspendContext, position, ignoreBreakpoints);
    checkRunToCursorIsOk(position, runToCursorCommand);
    return runToCursorCommand;
  }

  private void checkRunToCursorIsOk(@NotNull XSourcePosition position, RunToCursorCommand runToCursorCommand) throws EvaluateException {
    if (runToCursorCommand.myRunToCursorBreakpoint == null) {
      PsiFile psiFile = PsiManager.getInstance(project).findFile(position.getFile());
      throw new EvaluateException(
        JavaDebuggerBundle.message("error.running.to.cursor.no.executable.code", psiFile != null ? psiFile.getName() : "<No File>",
                                   position.getLine()), null);
    }
  }

  public @NotNull DebuggerCommandImpl createFreezeThreadCommand(ThreadReferenceProxyImpl thread) {
    return new FreezeThreadCommand(thread);
  }

  public @NotNull SuspendContextCommandImpl createResumeThreadCommand(SuspendContextImpl suspendContext, @NotNull ThreadReferenceProxyImpl thread) {
    return new ResumeThreadCommand(suspendContext, thread);
  }

  public @NotNull SuspendContextCommandImpl createPopFrameCommand(DebuggerContextImpl context, StackFrameProxyImpl stackFrame) {
    return new PopFrameCommand(context, stackFrame);
  }

  //public void setBreakpointsMuted(final boolean muted) {

View on GitHub (pinned to be881553f2)

Solutions

  1. Place the cursor on a line that contains an executable statement and retry Run To Cursor
  2. Step over/into until reaching an executable line, then use Run To Cursor
  3. Set a manual line breakpoint on a nearby executable line instead
Defensive patterns

Strategy: validation

Validate before calling

XSourcePosition pos = editor.getCaretPosition();
if (XDebuggerUtil.getInstance().isLineBreakpointAvailable(project, pos.getFile(), pos.getLine())) {
  process.createRunToCursorCommand(suspendContext, pos, false);
} else {
  // notify user: no executable code at this line
}

Try / catch

try {
  process.createRunToCursorCommand(ctx, position, ignore);
} catch (EvaluateException e) {
  // show 'no executable code' hint, keep the debugger suspended
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of JetBrains/intellij-community@be881553f2 (2026-08-14). Data as JSON: /api/errors/754c3789d3dc0517. Report an issue: GitHub.