Repository: quarkusio/quarkus
Issue: Unable to change debug port in dev mode

**Describe the bug**
The DevMojo no longer respects the `debug` option when setting up the debug port it dev mode.  Looks to be a result of commit https://github.com/quarkusio/quarkus/commit/66d25b78f0cd386b6deb7a3eeb20e3fb665bb01e

**Expected behavior**
`mvn compile quarkus:dev -Ddebug=5006` should listen on port 5006 for debugger connections.

**Actual behavior**
Dev mode always listens to port 5005 for debugger connections.


**To Reproduce**
Steps to reproduce the behavior:
1. Create a Quarkus project using at least version 0.27.0
2. Start the project with a debug port of something other than 5005
3. Note in the console that it uses 5005 instead of the specified value

**Environment (please complete the following information):**
 - Output of `uname -a` or `ver`: 
```
Linux vm 5.0.0-32-generic #34-Ubuntu SMP Wed Oct 2 02:06:48 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
```

 - Output of `java -version`: 
```
openjdk version "11.0.4" 2019-07-16
OpenJDK Runtime Environment (build 11.0.4+11-post-Ubuntu-1ubuntu219.04)
OpenJDK 64-Bit Server VM (build 11.0.4+11-post-Ubuntu-1ubuntu219.04, mixed mode, sharing)
```

 - GraalVM version (if different from Java): n/a
 - Quarkus version or git rev: 0.28.0


Changed files:
devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java

diff --git a/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java b/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java
index e70d77a2c6d..a0d0607fa1d 100644
--- a/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java
+++ b/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java
@@ -264,15 +264,6 @@ public void execute() throws MojoFailureException, MojoExecutionException {
                 suspend = "n";
             }
 
-            boolean useDebugMode = true;
-            // debug mode not specified
-            // make sure 5005 is not used, we don't want to just fail if something else is using it
-            try (Socket socket = new Socket(InetAddress.getByAddress(new byte[] { 127, 0, 0, 1 }), 5005)) {
-                getLog().error("Port 5005 in use, not starting in debug mode");
-                useDebugMode = false;
-            } catch (IOException e) {
-            }
-
             if (jvmArgs != null) {
                 args.addAll(Arrays.asList(jvmArgs.split(" ")));
             }
@@ -283,7 +274,7 @@ public void execute() throws MojoFailureException, MojoExecutionException {
                 args.add("-Xverify:none");
             }
 
-            DevModeRunner runner = new DevModeRunner(args, useDebugMode);
+            DevModeRunner runner = new DevModeRunner(args);
 
             runner.prepare();
             runner.run();
@@ -308,7 +299,7 @@ public void execute() throws MojoFailureException, MojoExecutionException {
                         }
                     }
                     if (changed) {
-                        DevModeRunner newRunner = new DevModeRunner(args, useDebugMode);
+                        DevModeRunner newRunner = new DevModeRunner(args);
                         try {
                             newRunner.prepare();
                         } catch (Exception e) {
@@ -414,11 +405,9 @@ class DevModeRunner {
         private final List<String> args;
         private Process process;
         private Set<Path> pomFiles = new HashSet<>();
-        private final boolean useDebugMode;
 
-        DevModeRunner(List<String> args, boolean useDebugMode) {
+        DevModeRunner(List<String> args) {
             this.args = new ArrayList<>(args);
-            this.useDebugMode = useDebugMode;
         }
 
         /**
@@ -426,6 +415,14 @@ class DevModeRunner {
          */
         void prepare() throws Exception {
             if (debug == null) {
+                boolean useDebugMode = true;
+                // debug mode not specified
+                // make sure 5005 is not used, we don't want to just fail if something else is using it
+                try (Socket socket = new Socket(InetAddress.getByAddress(new byte[] { 127, 0, 0, 1 }), 5005)) {
+                    getLog().error("Port 5005 in use, not starting in debug mode");
+                    useDebugMode = false;
+                } catch (IOException e) {
+                }
                 if (useDebugMode) {
                     args.add("-Xdebug");
                     args.add("-Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=" + suspend);