[release] src/goDebug: check for undefined launchArgs.packagePathToGoModMap

Add a sanity check that launchArgs.packagePathToGoModPathMap is not
undefined.

Updates golang/vscode-go#982

Change-Id: Id7470268c6beaf3e7656e16a1d07fb7ea6d80cca
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/274932
Trust: Suzy Mueller <suzmue@golang.org>
Run-TryBot: Suzy Mueller <suzmue@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Quoc Truong <quoct@google.com>
(cherry picked from commit 650b8ae62efaacc67ea63989372ddf73b36a7f03)
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/276215
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Robert Findley <rfindley@google.com>
diff --git a/src/debugAdapter/goDebug.ts b/src/debugAdapter/goDebug.ts
index a4a7628..84e36d7 100644
--- a/src/debugAdapter/goDebug.ts
+++ b/src/debugAdapter/goDebug.ts
@@ -586,6 +586,9 @@
 				}
 
 				const currentGOWorkspace = getCurrentGoWorkspaceFromGOPATH(env['GOPATH'], dirname);
+				if (!launchArgs.packagePathToGoModPathMap) {
+					launchArgs.packagePathToGoModPathMap = {};
+				}
 				dlvArgs.push(mode || 'debug');
 				if (mode === 'exec' || (mode === 'debug' && !isProgramDirectory)) {
 					dlvArgs.push(program);