You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
src/goDebugConfiguration: resolve relative paths used in cwd, output, program
If relative paths are used, translate them to be relative to the workspace folder when
using dlv-dap.
The description in the package.json says cwd is a workspace relative or absolute path, but
this seems to be broken in the old adapter (I.e., when cwd=., the old adapter simply used it
as --wd value and launched the headless server in the program directory. As a result, '.'
is translated as the program or package source directory).
This CL doesn't attempt to fix or change the behavior of the old adapter though, but
applies the translation only when dlv-dap is used.
This changes the default cwd value (when users attempt to add cwd to their launch config)
to be '' which is treated as if 'cwd' attribute was undefined. Users who want to use the
workspace folder can use `${workspaceFolder}` or `.`.
This change doesn't change 'cwd' in attach mode because this is currently used for
different purpose in the legacy adapter, and it will become irrelevant in dlv-dap.
Updates #1348
Change-Id: Ieb15f6bbb470a17d2e7350ccf1d8a003cbb92eeb
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/317210
Trust: Hyang-Ah Hana Kim <[email protected]>
Run-TryBot: Hyang-Ah Hana Kim <[email protected]>
TryBot-Result: kokoro <[email protected]>
Reviewed-by: Suzy Mueller <[email protected]>
Copy file name to clipboardExpand all lines: package.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -576,8 +576,8 @@
576
576
},
577
577
"cwd": {
578
578
"type": "string",
579
-
"description": "Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.",
580
-
"default": "."
579
+
"description": "Workspace relative or absolute path to the working directory of the program being debugged if a non-empty value is specified. The 'program' folder is used as the working directory if it is omitted or empty.",
0 commit comments