Quarkus debug
Skill kinhluan/rules-quarkus-skills/.agent-skills/quarkus-debug
Expert skill for deep debugging of Quarkus applications, covering Dev Mode, Reactive patterns (Mutiny), Native Image (AOT) issues, and Build-time (Augmentation) troubleshooting.From its SKILL.md
npx -y skills add kinhluan/rules-quarkus-skills --skill quarkus-debugAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
3 things to look at
- 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 2 commands, including `java -agentlib:native-image-agent=config-output-dir=./config -jar target/*-runner.jar` and 1 more.
- fetches URLsInstructs the agent to fetch 4 URLs, including https://smallrye.io/smallrye-mutiny/latest/guides/infrastructure/ and 3 more.
SKILL.md
6.0 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it
quarkus-debug
Keyword: quarkus-debug | Platforms: gemini,claude,codex
Expert AI Agent Skill for Quarkus Debugging - Advanced techniques for diagnosing and fixing issues across the entire Quarkus lifecycle, from development mode to native executables.
Core Mandates
- Dev Mode First: Always leverage
quarkus:devfor immediate feedback and live reload. - Context-Aware Debugging: Distinguish between Imperative (Blocking) and Reactive (Event Loop) contexts.
- Binary Parity: Ensure behavior consistency between JVM mode and Native Image mode.
- Augmentation Insight: Distinguish between build-time (deployment) and run-time errors.
- No-Block Rule: Never block the Event Loop during debugging unless using specific thread-aware tools.
π Debugging Domains
1. Development Phase (Dev Mode)
- JPDA/Remote Debug: Default port
5005. Usequarkus.debug.hostandquarkus.debug.portto customize. - Dev UI (
/q/dev):- Inspect CDI Beans, Configuration, and Extension status.
- Use the Arc extension UI to debug dependency injection issues.
- Continuous Testing: Debug tests as they run in the background.
- Hot Reload Issues: If changes don't reflect, check
quarkus.live-reload.passwordor ClassLoader isolation settings.
2. Reactive & Asynchronous (Mutiny)
- Stack Trace Unwrapping: Reactive stack traces are often unhelpful. Use
.onFailure().invoke(Throwable::printStackTrace)or Mutiny's infrastructure tools. - Context Propagation:
- Debug
ContextNotActiveExceptionby ensuringDuplicatedContextis propagated correctly. - Use
quarkus.arc.context-propagation.enabled=true.
- Debug
- Event Loop Blocking: Enable
quarkus.vertx.warning-exception-timeto detect long-running tasks blocking the Event Loop. - Mutiny Infrastructure: Use
Infrastructure.setCanClearThreadLocals(false)carefully to debug ThreadLocal issues.
3. Native Executables (GraalVM AOT)
- AOT Issues: Most native errors are due to Reflection, Resources, or Dynamic Proxies missing from
reflect-config.json. - GraalVM Agent: Run in JVM mode with the agent to auto-generate configs:
java -agentlib:native-image-agent=config-output-dir=./config -jar target/*-runner.jar - Native Debugging: Build with
-H:GenerateDebugInfo=1and use GDB or LLDB. - Static vs Runtime Init: Debug
InitializerErrorby checkingquarkus.native.additional-build-args=--trace-class-initialization=....
4. Build-Time (Augmentation)
- BuildStep Failure: If the build fails during "Augmenting phase", it's a
deploymentissue. - Log Verbosity: Use
-Dquarkus.log.level=DEBUGduring build to see extension internal logs. - Bytecode Inspection: Inspect generated classes in
target/quarkus-app/lib/main/or using tools likejavap. - Bazel (rules_quarkus):
- Debug augmentation by running with
--sandbox_debug --verbose_failures. - Investigate
QuarkusBootstrapby checking the generatedquarkus-bootstrap.json.
- Debug augmentation by running with
π Troubleshooting Workflows
ClassLoader & Dependency Conflicts
- Issue:
ClassCastExceptionorNoClassDefFoundErrorin Dev Mode. - Solution: Quarkus uses a multi-layered ClassLoader. Check if a library is being loaded by the "Runtime ClassLoader" but expected by the "Base ClassLoader".
- Action: Use
quarkus.class-loading.parent-first-artifactsto force specific libraries to the parent ClassLoader.
Database & Dev Services
- Issue: Testcontainers/Dev Services fail to start.
- Action: Check Docker connectivity. Inspect logs using
docker logs <container_id>. Usequarkus.datasource.devservices.portto pin ports for external inspection.
Memory Leaks in Dev Mode
- Issue:
OutOfMemoryErrorafter several hot reloads. - Action: Often caused by static fields or threads not being shut down by an extension. Use JFR (Java Flight Recorder) to profile:
mvn quarkus:dev -Dquarkus.profile=dev -Djava.arg.1=-XX:StartFlightRecording=filename=recording.jfr
π Troubleshooting Sources
Directive: When dealing with cryptic reactive stack traces or native crashes, use
web_fetchon these specialized troubleshooting guides.
- Reactive Diagnostics: Mutiny Infrastructure Guide - Clear ThreadLocals and debug handlers.
- Native Crash Analysis: GraalVM Native Image Diagnostics - Debugging native executables.
- Context Propagation: SmallRye Context Propagation Guide - Dealing with ThreadLocal loss in async code.
- OTel Tracing: Quarkus OpenTelemetry Guide - Tracing requests across microservices.
π References & Tools
- Quarkus - Debugging Guide
- Mutiny - Troubleshooting Guide
- GraalVM - Native Image Debugging
- rules_quarkus - Integration Troubleshooting
Skill Interoperability
The quarkus-debug π skill is an advanced troubleshooting layer built on:
- java-expert β: JVM internals, JFR, and basic JPDA.
- quarkus-expert β‘: CDI, Augmentation, and Dev Mode internals.
- vertx-expert π: Event Loop and non-blocking I/O debugging.
- graalvm-expert π: AOT compilation and native runtime issues.
- rules-quarkus π§: Bazel-specific augmentation and orchestration.
What ships with it: 1 file
1.0 KB alongside SKILL.md
- SKILL.toon1.0 KB