quarkusio/quarkus · error · ResponseErrorException

InvalidRequest

InvalidRequest

Error message

Debuggee agent is not enabled.

What it means

EvaluationSupport.evaluate() implements the DAP 'evaluate' request for the Qute debugger. It throws ResponseErrorException with code InvalidRequest when the debuggee agent (QuteDebugAgent) is not enabled, meaning expression evaluation is unavailable because debugging was never activated for the render process.

Source

Thrown at independent-projects/qute/debug/src/main/java/io/quarkus/qute/debug/agent/evaluations/EvaluationSupport.java:48

    public EvaluationSupport(DebuggeeAgent agent) {
        this.agent = agent;
    }

    /**
     * Evaluates a string expression in the context of a given stack frame.
     *
     * @param frameId the ID of the stack frame where the expression should be evaluated
     * @param expression the expression to evaluate
     * @param context the evaluation context (e.g., HOVER, WATCH)
     * @return a CompletableFuture resolving to an {@link EvaluateResponse}
     */
    public CompletableFuture<EvaluateResponse> evaluate(Integer frameId, String expression, String context) {
        if (!agent.isEnabled()) {
            // Debugger not enabled: return an error immediately
            ResponseError re = new ResponseError();
            re.setCode(ResponseErrorCode.InvalidRequest);
            re.setMessage("Debuggee agent is not enabled.");
            throw new ResponseErrorException(re);
        }

        // Find the stack frame
        RemoteStackFrame frame = agent.findStackFrame(frameId);
        if (frame == null) {
            // Frame not found: return null
            return CompletableFuture.completedFuture(null);
        }

        // Evaluate the expression asynchronously
        return frame.evaluate(expression)
                .handle((result, error) -> {
                    // Handle evaluation errors
                    if (error != null) {
                        if (EvaluateArgumentsContext.HOVER.equals(context)) {
                            // Ignore errors in hover context
                            return IGNORE_RESULT;
                        }

View on GitHub (pinned to e1c734241f)

Solutions

  1. Enable the Qute debugger before evaluating — e.g. start the app with Qute debugging enabled (dev mode / quarkus.qute.debug=true or the DAP launch that enables the agent).
  2. Verify agent.isEnabled() returns true in your client before sending evaluate requests.
  3. If using the Qute DAP integration, use the launch/attach flow that calls the agent's enable/start, not raw attach to a non-debug process.
  4. Rebuild/run in dev mode; production builds typically do not enable the debug agent.

Example fix

// before
EvaluateResponse r = evaluationSupport.evaluate(frameId, expr, ctx);
// after
if (!agent.isEnabled()) {
    agent.enable(); // start the Qute debug agent first
}
EvaluateResponse r = evaluationSupport.evaluate(frameId, expr, ctx);
Defensive patterns

Strategy: validation

Validate before calling

if (!agent.isEnabled()) {
    throw new IllegalStateException("Enable the Qute debug agent before evaluating");
}

Type guard

boolean canEvaluate(io.quarkus.qute.debug.agent.QuteDebugAgent agent) {
    return agent != null && agent.isEnabled();
}

Try / catch

try {
    return evaluationSupport.evaluate(frameId, expression, context).get();
} catch (ResponseErrorException e) {
    if (e.getResponseError().getCode() == ResponseErrorCode.InvalidRequest
            && "Debuggee agent is not enabled.".equals(e.getResponseError().getMessage())) {
        // enable the agent (dev mode / quarkus.qute.debug) and retry
    }
    throw e;
}

Prevention

When it happens

Trigger: Calling evaluate() (directly or via resolve/result/evaluateMessageKey/evaluateMessageParams/collectionResolveAsync) when agent.isEnabled() is false — i.e. the Qute debugging agent was not started/enabled before the evaluation request arrived.

Common situations: DAP client attached without enabling the Qute debug agent (missing quarkus.qute.debug / dev-mode debug flag); evaluation attempted before agent initialization finished; running a production build where debug support is off.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/7a9b7b1cf74438f5. Report an issue: GitHub.