Class DebugQuteEngineObserver

java.lang.Object
io.quarkus.qute.runtime.debug.DebugQuteEngineObserver

@Singleton @Experimental("This observer is experimental and may change in the future") public class DebugQuteEngineObserver extends Object
Observes the creation of Qute engines and attaches the Qute debugger in development mode.

When a new EngineBuilder is observed and the application is started with "-DquteDebugPort" and running in development mode with quarkus.qute.debug.enabled=true, this observer:

  • Enables template tracing on the engine (required for the debugger).
  • Registers a RegisterDebugServerAdapter to allow DAP clients to connect.

The cleanup() method ensures that the debugger is properly reset when the application shuts down.

  • Constructor Details

    • DebugQuteEngineObserver

      public DebugQuteEngineObserver()
  • Method Details

    • configureEngine

      void configureEngine(@Observes io.quarkus.qute.EngineBuilder builder, QuteConfig config)
      Configures the engine with tracing and debugger support if debugging is enabled.
      Parameters:
      builder - the Qute engine builder being observed
      config - the Qute configuration
    • cleanup

      @PreDestroy void cleanup()
      Cleans up the debugger on shutdown by resetting the registered debug server adapter.