Chapter 12. Debugging your Quarkus project
When Quarkus starts in development mode, debugging is enabled by default. The debugger listens on port 5005
without suspending the JVM.
Prerequisites
- You have a Quarkus Maven project.
Procedure
Use one of the following methods to control debugging:
Control the debugger through system properties
Change one of the following values of the
debug
system property wherePORT
is the port that the debugger is listening on:-
false
: The JVM starts with debug mode disabled. -
true
: The JVM starts in debug mode and is listening on port5005
. -
client
: The JVM starts in client mode and tries to connect tolocalhost:5005
. -
PORT
: The JVM starts in debug mode and is listening onPORT
.
-
Change the value of the
suspend
system property. This property is used when Quarkus starts in debug mode.-
y
ortrue
: The debug mode JVM launch suspends. -
n
orfalse
: The debug mode JVM starts without suspending.
-
Control the debugger from the command line
To start your Quarkus application in debug mode with JVM, enter the following command:
./mvnw compile quarkus:dev -Ddebug
-
Attach a debugger to
localhost:5005
.