JetBrains/intellij-community · error · EvaluateException

Param index {paramId} requested, but only {argumentValues.si

Error message

Param index {paramId} requested, but only {argumentValues.size()} available

What it means

Error "Param index {paramId} requested, but only {argumentValues.size()} available" thrown in JetBrains/intellij-community.

Source

Thrown at java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/StackCapturingLineBreakpoint.java:239

  }

  private static class MyEvaluator {
    private final String myExpression;
    private ExpressionEvaluator myEvaluator;
    private final Map<Location, ExpressionEvaluator> myEvaluatorCache = new WeakHashMap<>();

    MyEvaluator(String expression) {
      myExpression = expression;
      int paramId = DecompiledLocalVariable.getParamId(myExpression);
      boolean paramEvaluator = paramId > -1;
      if (paramEvaluator) {
        myEvaluator = new ExpressionEvaluatorImpl(new Evaluator() {
          @Override
          public Object evaluate(EvaluationContextImpl context) throws EvaluateException {
            @SuppressWarnings("ConstantConditions")
            List<Value> argumentValues = context.getFrameProxy().getArgumentValues();
            if (paramId >= argumentValues.size()) {
              throw new EvaluateException("Param index " + paramId + " requested, but only " + argumentValues.size() + " available");
            }
            return argumentValues.get(paramId);
          }
        });
      }
    }

    @Nullable
    Value evaluate(final EvaluationContext context) throws EvaluateException {
      ExpressionEvaluator evaluator = myEvaluator;
      if (evaluator == null) {
        @SuppressWarnings("ConstantConditions")
        Location location = context.getFrameProxy().location();
        evaluator = location == null ? null : myEvaluatorCache.get(location);
        if (evaluator == null && !StringUtil.isEmpty(myExpression)) {
          evaluator = ReadAction.compute(() -> {
            SourcePosition sourcePosition = ContextUtil.getSourcePosition(context);
            PsiElement contextElement = ContextUtil.getContextElement(sourcePosition);

View on GitHub (pinned to be881553f2)

Solutions

  1. Request only parameter indices that actually exist for the captured method call.
  2. Recapture the stack after fixing the method signature or the param index used in the capture configuration.

Example fix

For a method with 2 parameters use param indices 0 and 1 only in the captured data view.

When it happens

Trigger: A stack-capturing breakpoint asks for a parameter index beyond the number of captured argument values.

Common situations: Stale capture points recorded against an older method signature with more parameters.


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