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

  1. Change one of the following values of the debug system property where PORT 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 port 5005.
    • client: The JVM starts in client mode and tries to connect to localhost:5005.
    • PORT: The JVM starts in debug mode and is listening on PORT.
  2. Change the value of the suspend system property. This property is used when Quarkus starts in debug mode.

    • y or true: The debug mode JVM launch suspends.
    • n or false: The debug mode JVM starts without suspending.

Control the debugger from the command line

  1. To start your Quarkus application in debug mode with JVM, enter the following command:

    ./mvnw compile quarkus:dev -Ddebug
  2. Attach a debugger to localhost:5005.