Chapter 15. 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:
Controlling the debugger through system properties
Change one of the following values of the
debugsystem property wherePORTis 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
suspendsystem property. This property is used when Quarkus starts in debug mode.-
yortrue: The debug mode JVM launch suspends. -
norfalse: The debug mode JVM starts without suspending.
-
Controlling 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
Enabling the debugger for a specific host domain
In development mode, the debugger is only enabled for applications that you execute on localhost. You must manually enable debugging on other hosts.
Use the
debugHostoption to enable debugging on a specific host. You must replace<host-ip-address>with the IP adress of the host for which you want to enable debugging../mvnw compile quarkus:dev -DdebugHost=<host-ip-address>
To enable debugging on all hosts, replace
<host-ip-address>with0.0.0.:./mvnw compile quarkus:dev -DdebugHost=0.0.0.0