-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow Quarkus to pick a random debug port #33521
Conversation
By passing a zero or negative value, Quarkus will launch the dev-mode JVM process using a random debugging port Fixes: quarkusio#33363
As a follow-up, we could potentially force the use of a different port if the configured port is already taken. |
Given that in the |
Yeah, I think it's pretty benign to do the same for negative numbers |
@maxandersen okay to merge? |
Yeah +1 though I'm mainly after having stable port used and then choose randomly if blocked. Then one can start multiple quarkus dev and use discovery attach in IDEs that supports it. |
Actually. Wait a sec. Need to test something first. |
I can do that too after this one |
okey so here is what I was investigating - how intellij actually behave today. if you start two quarkus-dev listening on differeth http ports you end up with this view: note, one of those failed to listen and thus you can't know which is the right one if you are running multiple of the same app (different ones will have different path). if you set explicit ports you get this: now you can actually differentiate. Thus on its own this PR is of less use since if I need to set the -Ddebug value I would just set them explicitly as I did in the above. so +1 on merging this but we really should be looking at getting dev mode by default to grab random debug port if requested is not available so you are always able to debug your quarkus dev mode. |
Sure yeah, I'll have a look tomorrow |
By passing a zero or negative value, Quarkus
will launch the dev-mode JVM process
using a random debugging port
Relates to: #33363