Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

quarkusio change default debug port using quarkus:dev

Tags:

quarkus

I have two apps running.

App1: Read from amq, enrich the message and send the message to App2 through other amq

App2: Read the message and call another project for processing.

Y want to debug booth Apps in the same time and see how the message change in time.

When I start the App2 with mvn compile quarkus:dev I got this:

[ERROR] Port 5005 in use, not starting in debug mode

of course the app is runnig but without debuger.

Exist some way to change the default debug port in quarkus?

PD: I just try -Dquarkus.debug.port=5006, but nothing happens...

Thanks

like image 901
Victor Avila Avatar asked Mar 21 '19 21:03

Victor Avila


People also ask

How do I enable debugging in Quarkus?

When Quarkus starts in development mode, debugging is enabled by default. The debugger listens on port 5005 without suspending the JVM. You have a Quarkus Maven project. Change one of the following values of the debug system property where PORT is the port that the debugger is listening on:

How do I change the default server port in Quarkus?

By default, similar to many other Java server applications, Quarkus listens to port 8080. In order to change the default server port, we can use the quarkus.http.port property. Quarkus reads its configuration properties from various sources. Therefore, we can change the quarkus.http.port property from different sources, as well.

How to pass a profile to a Quarkus application?

We also can use property quarkus-profileto pass a specified profile to the Quarkus application. In this example, the profile is server1, and the HTTP port will be 6666. Terminal # %server1.quarkus.http.port=6666 $ mvn -Dquarkus-profile=server1 compile quarkus:dev

How do I change the property value of a Quarkus profile?

By default, Quarkus has three profiles: dev– Activated when in development mode (i.e. quarkus:dev) test– Activated when running tests prod– The default profile when not running in development or test mode 2.2 The Quarkus supports the following syntax to change the property value based on profiles. %{profile}.config.key=value For example:


1 Answers

The -Ddebug system property can be used to specify a debug port as well. In your case, mvn compile quarkus:dev -Ddebug=5006 should work.

See this javadoc https://github.com/quarkusio/quarkus/blob/1.8.1.Final/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java#L140-L166 for more info.

like image 107
Ladicek Avatar answered Sep 27 '22 23:09

Ladicek