JetBrains/intellij-community · warning · EvaluateException
There is no executable code at
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.
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
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
- 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
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
- ATTACH_VM_FAILED
- Cannot construct wrapper object for value of type
- Cannot convert to primitive value of type
- Error creating evaluation class loader:
- Error during class
AI-assisted analysis of JetBrains/intellij-community@be881553f2 (2026-08-14).
Data as JSON: /api/errors/754c3789d3dc0517.
Report an issue: GitHub.
Appendix: 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)