Skip to content

Conversation

@angelozerr
Copy link
Contributor

@angelozerr angelozerr commented Jan 8, 2026

Support for debugging Qute template in Java annotation:

image

This PR requires:

After building Quarkus debugger with quarkusio/quarkus#51454 and use Quarkus LS redhat-developer/quarkus-ls#1093, you will need:

<dependency>
      <groupId>io.quarkus.qute</groupId>
      <artifactId>qute-generator</artifactId>
      <version>999-SNAPSHOT</version>
  </dependency>
  <dependency>
      <groupId>io.quarkus.qute</groupId>
      <artifactId>qute-core</artifactId>
      <version>999-SNAPSHOT</version>
  </dependency>
  <dependency>
      <groupId>io.quarkus.qute</groupId>
      <artifactId>qute-debug</artifactId>
      <version>999-SNAPSHOT</version>
  </dependency>
  <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-qute</artifactId>
      <version>999-SNAPSHOT</version>
  </dependency>
  <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-qute-deployment</artifactId>
      <version>999-SNAPSHOT</version>
  </dependency>
  • create a class with @TemplateContents like this:
package org.acme.quarkus.sample;

import io.quarkus.qute.TemplateContents;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.QueryParam;

import io.quarkus.qute.TemplateInstance;

@Path("hello")
public class HelloResource {

    @TemplateContents(value = "<p>Hello {name}!</p>")
    record Hello(String name) implements TemplateInstance {}

    @GET
    public TemplateInstance get(@QueryParam("name") String name) {
        return new Hello(name); 
    }
}
  • defines a launch (in launch.json) for Qute debugger like this:
{
      "name": "Debugging Qute Templates",
      "type": "qute",
      "request": "attach",
      "port": 4971
  }
  • update task.json with "command": "./mvnw quarkus:dev -DquteDebugPort=4971", (or start Quarkus app with the command quarkus:dev -DquteDebugPort=4971

  • start Quarkus app

  • start Qute debugger (update task.json with "command": "./mvnw quarkus:dev -DquteDebugPort=4971",

  • set a breakpoint in @TemplateContents line.

  • open your browser with http://localhost:8080/hello

  • breakpoint should be suspended

image

@angelozerr angelozerr force-pushed the qute_debug_in_java_annotation2 branch 2 times, most recently from 82cbd3c to abc7f65 Compare January 8, 2026 14:27
@angelozerr angelozerr force-pushed the qute_debug_in_java_annotation2 branch from abc7f65 to dd33852 Compare January 8, 2026 17:10
@angelozerr angelozerr requested a review from datho7561 January 8, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant