I have launched my application using the Quarkus dev mode (mvn quarkus:dev
) and I would like to be able to debug it.
How can do that?
When launching a Quarkus app simply using mvn quarkus:dev
, the running application is configured to open port 5005
for remote debugging.
That means that all you have to do is point your remote debugger to that port and you will be able to debug it in your favorite IDE/lightweight editor.
If however you would like to be able to suspend the application until a debugger is connected then simply execute:
Maven:
mvn quarkus:dev -Dsuspend
Gradle:
./gradlew quarkusDev -Dsuspend=true
The same port is used (5005
) but this time the application doesn't start until a remote debugger is connected. You can use -Ddebug
to change the debugging port.
UPDATE
As of version 2020.3, IntelliJ Ultimate should recognize a quarkus application and automatically create a launch configuration that uses quarkus:dev
under the hood.
In case you are using IntellJ IDEA run your application normally (without debugging) and then go to
RUN --> Attach to Process.
This will attach the debugger separately and has worked for me.
To start a Quarkus application directly with debug configuration in IntelliJ IDEA, you have the option of using "mvn quarkus:dev" and then attaching, but it's easier to use a plugin. To debug a Quarkus app in IntelliJ IDEA, follow these steps: