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
extension: use Delve's guess-substitute-path-helper when available
When the remote mode is specified try to call
dlv guess-substitute-path-helper
and if it is available use its ouptut and switch to dlv-dap mode unless
otherwise specified.
The legacy adapter has been unmaintained for years and has known bugs
(for example, breakpoints can not be set while the program is running)
but couldn't be deleted because it implements automatic mappings of
source files.
Updates #3096, #3193
Change-Id: Ie2f731b149e0ba4d5031bb57d61e7b407c3a40f8
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/643280
Reviewed-by: Hongxiang Jiang <[email protected]>
kokoro-CI: kokoro <[email protected]>
Reviewed-by: Robert Findley <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
// If neither launch.json nor settings.json gave us the debugAdapter value, we go with the default
186
-
// from package.json (dlv-dap) unless this is remote attach with a stable release.
186
+
187
+
// If neither launch.json nor settings.json gave us the debugAdapter, we go with the default from pacakge.json (dlv-dap) for all modes except 'remote'.
188
+
// For remote we will use 'dlv-dap' if we can call 'dlv substitute-path-guess-helper' or 'legacy' otherwise.
@@ -372,6 +384,41 @@ export class GoDebugConfigurationProvider implements vscode.DebugConfigurationPr
372
384
returndebugConfiguration;
373
385
}
374
386
387
+
/**
388
+
* Calls `dlv substitute-path-guess-helper` to get a set of parameters used by Delve to guess the substitutePath configuration after also examining the executable.
389
+
*
390
+
* See https://github.com/go-delve/delve/blob/d5fb3bee427202f0d4b1683bf743bfd2adb41757/service/debugger/debugger.go#L2466
0 commit comments