sebastiandaschner blog
5 Ways to Debug Quarkus JVM Applications
tuesday, may 21, 2024Quarkus' dev mode is a wonderful way to quickly update your code while programming, including adding some debug statements. Your IDE’s debug functionality, however, is still a powerful method to debug more complex or unclear situations. In this video I’m showing five different ways how to debug your Quarkus application, locally, in containers, or in Kubernetes.
Takeaways
-
You IDE’s debug feature is your friend (in IntelliJ:
Run
>Edit Configurations
>Remote JVM Debug
) -
mvn quarkus:dev
automatically listens tolocalhost:5005
for remote JVM debug, change via
-Ddebug=<port>
or-Ddebug=false
-
For
java -jar
, add a command line argument such as
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
-
For Docker containers, you can override environment variables or the command at
docker run
time -
Quarkus comes with a
remote-dev
mode that enables us to connect to (remote) Quarkus applications and change classes or debug -
In Kubernetes environments, you can change the pod run configuration, for example via
command
orenv
directive
More Information
- Playground Project (GitHub)
- Quarkus remote-dev in Docker Containers
- Effective Developer Workflows With Quarkus
- Quarkus Maven Tooling
Found the post useful? Then you might want to have a look at my Quarkus video courses.