JetBrains/intellij-community · error · EvaluateException
Error during generated code invocation
Error message
Error during generated code invocation
What it means
Error "Error during generated code invocation " thrown in JetBrains/intellij-community.
Source
Thrown at java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/CompilingEvaluator.java:94
try {
// invoke base evaluator on call code
ExpressionEvaluator evaluator =
DebuggerInvocationUtil.commitAndRunReadAction(myProject, new EvaluatingComputable<>() {
@Override
public ExpressionEvaluator compute() throws EvaluateException {
TextWithImports callCode = getCallCode();
PsiElement copyContext = myData.getAnchor();
CodeFragmentFactory factory = DebuggerUtilsEx.findAppropriateCodeFragmentFactory(callCode, copyContext);
return factory.getEvaluatorBuilder().build(factory.createPsiCodeFragment(callCode, copyContext, myProject),
// can not use evaluation position here, it does not match classes then
SourcePosition.createFromElement(copyContext));
}
});
return evaluator.evaluate(autoLoadContext);
}
catch (Exception e) {
throw new EvaluateException("Error during generated code invocation " + e, e);
}
}
private void defineClasses(Collection<ClassObject> classes,
EvaluationContextImpl context,
DebugProcess process,
ClassLoaderReference classLoader) throws EvaluateException {
boolean useMagicAccessorImpl = myData.useMagicAccessor();
defineClassesForEvaluation(classes, context, process, classLoader, GEN_CLASS_NAME, useMagicAccessorImpl);
process.findClass(context, getGenClassQName(), classLoader);
}
@ApiStatus.Internal
public static void defineClassesForEvaluation(@NotNull Collection<ClassObject> classes,
EvaluationContextImpl context,
DebugProcess process,
ClassLoaderReference classLoader,View on GitHub (pinned to be881553f2)
Solutions
- Simplify the expression so it compiles, or check the reported cause for the generated-code invocation failure.
- Ensure the expression does not call methods with side effects that throw in the target VM.
Example fix
Evaluate a smaller sub-expression first in Evaluate Expression to locate the failing part.
When it happens
Trigger: The compiling evaluator generated bytecode for an expression but invoking it in the target VM failed.
Common situations: Expressions throwing at runtime in the debuggee or using constructs unsupported by the compiling evaluator.
AI-assisted analysis of JetBrains/intellij-community@be881553f2 (2026-08-14).
Data as JSON: /api/errors/6b8bc1533539b9a0.
Report an issue: GitHub.