Repository: quarkusio/quarkus
Issue: Changing http.port breaks pressing 'd' or 'w' in dev mode

### Describe the bug

If an application has changed `quarkus.http.port` to some other value than `8080`, pressing `w` or `d` in dev mode still uses port `8080` in the browser window it opens.

### Expected behavior

If I have `quarkus.http.port=8085` in my `application.properties` I would expect that while in dev mode, pressing `d`would open http://localhost:8085/q/dev/ and pressing `w` would open http://localhost:8085/.

### Actual behavior

If I have `quarkus.http.port=8085` in my `application.properties` while in dev mode, pressing `d` opens http://localhost:8080/q/dev/ and pressing `w` opens http://localhost:8080/.

### How to Reproduce?

1. Create a new app from code.quarkus.io
2. In `application.properties`, set `quarkus.http.port=8085`
3. Run dev mode
4. Press `w` or `d`

### Output of `uname -a` or `ver`

_No response_

### Output of `java -version`

_No response_

### GraalVM version (if different from Java)

_No response_

### Quarkus version or git rev

2.5.0.Final

### Build tool (ie. output of `mvnw --version` or `gradlew --version`)

Maven 3.8.1

### Additional information

_No response_

Changed files:
extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/devmode/console/DevConsoleProcessor.java

diff --git a/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/devmode/console/DevConsoleProcessor.java b/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/devmode/console/DevConsoleProcessor.java
index b37a1f47e35..73e30738452 100644
--- a/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/devmode/console/DevConsoleProcessor.java
+++ b/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/devmode/console/DevConsoleProcessor.java
@@ -223,7 +223,7 @@ public void handle(HttpServerRequest event) {
     /**
      * Boots the Vert.x instance used by the DevConsole,
      * applying some minimal tuning and customizations.
-     * 
+     *
      * @return the initialized Vert.x instance
      */
     private static Vertx initializeDevConsoleVertx() {
@@ -465,24 +465,28 @@ void setupConsole(HttpRootPathBuildItem rp, NonApplicationRootPathBuildItem np,
         if (context == null) {
             context = ConsoleStateManager.INSTANCE.createContext("HTTP");
         }
+        Config c = ConfigProvider.getConfig();
+        String host = c.getOptionalValue("quarkus.http.host", String.class).orElse("localhost");
+        String port = c.getOptionalValue("quarkus.http.port", String.class).orElse("8080");
         context.reset(
-                new ConsoleCommand('w', "Open the application in a browser", null, () -> openBrowser(rp, np, "/")),
-                new ConsoleCommand('d', "Open the Dev UI in a browser", null, () -> openBrowser(rp, np, "/q/dev")));
+                new ConsoleCommand('w', "Open the application in a browser", null, () -> openBrowser(rp, np, "/", host, port)),
+                new ConsoleCommand('d', "Open the Dev UI in a browser", null, () -> openBrowser(rp, np, "/q/dev", host, port)));
     }
 
-    private void openBrowser(HttpRootPathBuildItem rp, NonApplicationRootPathBuildItem np, String s) {
-        if (s.startsWith("/q")) {
-            s = np.resolvePath(s.substring(3));
+    private void openBrowser(HttpRootPathBuildItem rp, NonApplicationRootPathBuildItem np, String path, String host,
+            String port) {
+        if (path.startsWith("/q")) {
+            path = np.resolvePath(path.substring(3));
         } else {
-            s = rp.resolvePath(s.substring(1));
+            path = rp.resolvePath(path.substring(1));
         }
 
         StringBuilder sb = new StringBuilder("http://");
         Config c = ConfigProvider.getConfig();
-        sb.append(c.getOptionalValue("quarkus.http.host", String.class).orElse("localhost"));
+        sb.append(host);
         sb.append(":");
-        sb.append(c.getOptionalValue("quarkus.http.port", String.class).orElse("8080"));
-        sb.append(s);
+        sb.append(port);
+        sb.append(path);
         String url = sb.toString();
 
         Runtime rt = Runtime.getRuntime();