src/goDebugConfiguration: always set cwd in attach mode & legacy adapter

Legacy adapter uses cwd to determine the working directory of the delve
process regardless of the mode.

Manually tested.

Fixes golang/vscode-go#1608

Change-Id: I07a86fb1a734eb3f86ff691616fc6e44933a0656
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/334111
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>
diff --git a/src/goDebugConfiguration.ts b/src/goDebugConfiguration.ts
index e86819b..1fa15dc 100644
--- a/src/goDebugConfiguration.ts
+++ b/src/goDebugConfiguration.ts
@@ -205,12 +205,7 @@
 		if (!debugConfiguration.hasOwnProperty('substitutePath') && dlvConfig.hasOwnProperty('substitutePath')) {
 			debugConfiguration['substitutePath'] = dlvConfig['substitutePath'];
 		}
-		if (
-			debugAdapter !== 'dlv-dap' &&
-			debugConfiguration.request === 'attach' &&
-			debugConfiguration.mode === 'remote' &&
-			!debugConfiguration['cwd']
-		) {
+		if (debugAdapter !== 'dlv-dap' && debugConfiguration.request === 'attach' && !debugConfiguration['cwd']) {
 			debugConfiguration['cwd'] = '${workspaceFolder}';
 			if (vscode.workspace.workspaceFolders?.length > 1) {
 				debugConfiguration['cwd'] = '${fileWorkspaceFolder}';