[release] src/goDebugConfiguration: pick fix for #1729

During release, part of the fix was dropped.
Restored the fix by copying the snapshot of the repo
at master before release (171cc61) and pick cfee3e1
the main fix intended for v0.28.1.

Updates golang/vscode-go#1729

Change-Id: I54728fa5d11903967a62004bddd6016b43a56dae
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/352056
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fd6c167..f94d2cd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,7 @@
 
 ### Fixes
 - Skipped launch configuration adjustment to address build errors when debugging using externally launched delve DAP servers. (Issue [1793](https://github.com/golang/vscode-go/issues/1793))
+- Restore the fix for Issue [1729](https://github.com/golang/vscode-go/issues/1729) that was accidentally dropped during merge for release.
 
 ## v0.28.0 - 20 Sep, 2021
 
diff --git a/src/goDebugConfiguration.ts b/src/goDebugConfiguration.ts
index c7c29f3..97e705e 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(
-				'ignorePortInDlvDapWarning',
-				"`port` is ignored with the 'dlv-dap' debugAdapter, which does not yet support remote debugging. Please file an issue if you have a use case that requires port."
-			);
-		}
 		if (debugConfiguration['debugAdapter'] === 'dlv-dap' && debugConfiguration['mode'] === 'remote') {
 			this.showWarning(
 				'ignoreDlvDAPInRemoteModeWarning',
diff --git a/src/goDebugFactory.ts b/src/goDebugFactory.ts
index f66a923..cf9cea7 100644
--- a/src/goDebugFactory.ts
+++ b/src/goDebugFactory.ts
@@ -38,6 +38,9 @@
 	private async createDebugAdapterDescriptorDlvDap(
 		configuration: vscode.DebugConfiguration
 	): Promise<vscode.ProviderResult<vscode.DebugAdapterDescriptor>> {
+		if (configuration.port) {
+			return new vscode.DebugAdapterServer(configuration.port, configuration.host ?? '127.0.0.1');
+		}
 		const logger = new TimestampedLogger(configuration.trace, this.outputChannel);
 		logger.debug(`Config: ${JSON.stringify(configuration)}`);
 		const d = new DelveDAPOutputAdapter(configuration, logger);
diff --git a/src/goInstallTools.ts b/src/goInstallTools.ts
index cf23f64..b8b8071 100644
--- a/src/goInstallTools.ts
+++ b/src/goInstallTools.ts
@@ -29,7 +29,6 @@
 	Tool,
 	ToolAtVersion
 } from './goTools';
-import { getFromWorkspaceState } from './stateUtils';
 import {
 	getBinPath,
 	getBinPathWithExplanation,