JetBrains/intellij-community · error · EvaluateException

Unable to evaluate the expression {ex.getMessage()}

Error message

Unable to evaluate the expression {ex.getMessage()}

What it means

Error "Unable to evaluate the expression {ex.getMessage()}" thrown in JetBrains/intellij-community.

Source

Thrown at java/debugger/impl/src/com/intellij/debugger/settings/NodeRendererSettings.java:556

    }

    private Value doEval(EvaluationContext evaluationContext, Value originalValue, MyCachedEvaluator cachedEvaluator)
      throws EvaluateException {
      final DebugProcess debugProcess = evaluationContext.getDebugProcess();
      if (originalValue == null) {
        return null;
      }
      try {
        final ExpressionEvaluator evaluator = cachedEvaluator.getEvaluator(debugProcess.getProject());
        if (!debugProcess.isAttached()) {
          throw EvaluateExceptionUtil.PROCESS_EXITED;
        }
        EvaluationContextImpl thisEvaluationContext = ((EvaluationContextImpl)evaluationContext).createEvaluationContext(originalValue);
        XEvaluationOrigin.setOrigin(thisEvaluationContext, XEvaluationOrigin.RENDERER);
        return evaluator.evaluate(thisEvaluationContext);
      }
      catch (final EvaluateException ex) {
        throw new EvaluateException(JavaDebuggerBundle.message("error.unable.to.evaluate.expression") + " " + ex.getMessage(), ex);
      }
    }

    private class MyCachedEvaluator extends CachedEvaluator {
      @Override
      protected String getClassName() {
        return MapEntryLabelRenderer.this.getClassName();
      }

      @Override
      public ExpressionEvaluator getEvaluator(Project project) throws EvaluateException {
        return super.getEvaluator(project);
      }
    }

    @Override
    public @NotNull XValuePresentation getPresentation(ValueDescriptorImpl descriptor) {
      boolean inCollection = descriptor instanceof ArrayElementDescriptor;

View on GitHub (pinned to be881553f2)

Solutions

  1. Fix the renderer expression so it compiles and evaluates against the current object.
  2. Check the reported message for the underlying evaluation cause and adjust the expression.

Example fix

In Settings | Debugger | Data Views | Java Type Renderers, edit the failing renderer expression and test it on a paused session.

When it happens

Trigger: A custom node renderer expression throws while being evaluated for display in the debugger.

Common situations: Renderer expressions calling methods that throw (e.g. NPE) or referencing fields absent from the displayed object.


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