src/goDebugConfiguration: remote attach should not be warned about port

Fixes golang/vscode-go#1765

Change-Id: I029f5b23c6487e0a6333814584c4ca90c7ed391f
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/348850
Trust: Suzy Mueller <suzmue@golang.org>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Suzy Mueller <suzmue@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Polina Sokolova <polina@google.com>
diff --git a/src/goDebugConfiguration.ts b/src/goDebugConfiguration.ts
index e35cd38..af5919e 100644
--- a/src/goDebugConfiguration.ts
+++ b/src/goDebugConfiguration.ts
@@ -158,12 +158,6 @@
 			// for local mode, default to dlv-dap.
 			debugConfiguration['debugAdapter'] = debugConfiguration['mode'] !== 'remote' ? 'dlv-dap' : 'legacy';
 		}
-		if (debugConfiguration['debugAdapter'] === 'dlv-dap' && debugConfiguration['port']) {
-			this.showWarning(
-				'ignorePortUsedInDlvDapWarning',
-				"`port` is used with the 'dlv-dap' debugAdapter to support [launching the debug adapter server externally](https://github.com/golang/vscode-go/blob/master/docs/debugging.md#running-debugee-externally). Remove 'host' and 'port' from your launch.json if you are not launching a DAP server."
-			);
-		}
 		if (debugConfiguration['debugAdapter'] === 'dlv-dap' && debugConfiguration['mode'] === 'remote') {
 			this.showWarning(
 				'ignoreDlvDAPInRemoteModeWarning',
@@ -171,6 +165,12 @@
 			);
 			debugConfiguration['debugAdapter'] = 'legacy';
 		}
+		if (debugConfiguration['debugAdapter'] === 'dlv-dap' && debugConfiguration['port']) {
+			this.showWarning(
+				'ignorePortUsedInDlvDapWarning',
+				"`port` is used with the 'dlv-dap' debugAdapter to support [launching the debug adapter server externally](https://github.com/golang/vscode-go/blob/master/docs/debugging.md#running-debugee-externally). Remove 'host' and 'port' from your launch.json if you are not launching a DAP server."
+			);
+		}
 
 		const debugAdapter = debugConfiguration['debugAdapter'] === 'dlv-dap' ? 'dlv-dap' : 'dlv';