Skip to content

Commit 5b0d6db

Browse files
committed
docs: update the debugging doc about remote mode default adapter
From v0.41.0, we are switching the default to dlv-dap. Fixes #2205 Change-Id: Iaef25bd94620fd74e7721ab7a55721a9f4f91355 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/562678 Commit-Queue: Hyang-Ah Hana Kim <[email protected]> TryBot-Result: kokoro <[email protected]> Reviewed-by: Suzy Mueller <[email protected]>
1 parent 95d6a45 commit 5b0d6db

File tree

2 files changed

+8
-30
lines changed

2 files changed

+8
-30
lines changed

docs/debugging-legacy.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The Go extension historically used a small adapter program to work with the Go debugger, [Delve].
44
The extension transitioned to communicate with [Delve] directly but there are still cases you may
5-
need to use the legacy debug adapter (e.g. remote debugging). This document explains how to use the
5+
need to use the legacy debug adapter. This document explains how to use the
66
***legacy*** debug adapter.
77

88

@@ -45,8 +45,6 @@ To opt in to use the legacy debug adapter (`legacy`) by default, add the followi
4545
```
4646

4747
If you want to use the legacy mode for only a subset of your launch configurations, you can use [the `debugAdapter` attribute](#launchjson-attributes) to switch between `"dlv-dap"` and `"legacy"` mode.
48-
For [Remote Debugging](#remote-debugging) (launch configuration with `"mode": "remote"` attribute),
49-
the extension will use the `"legacy"` mode by default, so setting this attribute won't be necessary.
5048

5149
Throughout this document, we assume that you opted in to use the legacy debug adapter.
5250
For debugging using the new debug adapter (default, `"dlv-dap"` mode), please see the documentation about [Debugging](https://github.com/golang/vscode-go/tree/master/docs/debugging-legacy.md).

docs/debugging.md

+7-27
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,8 @@ activities using
66
[VS Code’s Debugging UI](https://code.visualstudio.com/docs/editor/debugging).
77

88
These debugging features are possible by using
9-
[Delve](https://github.com/go-delve/delve), the Go debugger.
10-
11-
Previously, the Go extension communicated with Delve through a custom debug
12-
adaptor program (`legacy` mode). Since
13-
[`Delve`'s native debug adapter implementation](https://github.com/go-delve/delve/tree/master/service/dap)
14-
is available, the Go extension is transitioning to deprecate the legacy debug
15-
adapter in favor of direct communication with Delve via
16-
[DAP](https://microsoft.github.io/debug-adapter-protocol/overview).
17-
18-
19-
📣 **We are happy to announce that the new _`dlv-dap`_ mode of Delve
20-
integration is enabled for _local_ _debugging_ by default. For
21-
[_remote_ _debugging_](#remote-debugging) it is the default in
22-
[Go Nightly](nightly.md) and is available with stable builds on demand with
23-
`"debugAdapter": "dlv-dap"` attribute in `launch.json` or `settings.json`!**
24-
25-
Many features and settings described in this document may be available only with
26-
the new `dlv-dap` mode. For troubleshooting and configuring the legacy debug
27-
adapter, see
28-
[the legacy debug adapter documentation](https://github.com/golang/vscode-go/tree/master/docs/debugging-legacy.md).
9+
[Delve](https://github.com/go-delve/delve), the Go debugger, and its
10+
[native debug adapter implementation](https://github.com/go-delve/delve/tree/master/service/dap).
2911

3012
## Get started
3113

@@ -82,7 +64,9 @@ from the tree head.
8264

8365
### Switch to legacy debug adapter
8466

85-
Note: The extension still uses the legacy debug adapter for remote debugging.
67+
Previously, the Go extension communicated with Delve through a custom debug
68+
adaptor program (aka `legacy` mode). This legacy adapter is no longer maintained
69+
and will be removed by the end of 2024 H2.
8670

8771
If you need to use the legacy debug adapter for local debugging (`legacy` mode)
8872
by default, add the following in your VSCode settings.
@@ -93,9 +77,6 @@ by default, add the following in your VSCode settings.
9377
}
9478
```
9579

96-
When `mode` is set to `remote` you must explicitly set `debugAdapter` to
97-
`dlv-dap` to override the legacy adapter default.
98-
9980
If you want to switch to `legacy` for only a subset of your launch
10081
configurations, you can use
10182
[the `debugAdapter` attribute](#launchjson-attributes) to switch between
@@ -809,8 +790,8 @@ with a running target.
809790

810791
The
811792
[headless dlv server](https://github.com/go-delve/delve/tree/master/Documentation/api)
812-
can now be used with both `"debugAdapter": "legacy"` (default value) and
813-
`"debugAdapter": "dlv-dap"` (with Delve v1.7.3 or newer) as well as Delve's
793+
can now be used with both `"debugAdapter": "dlv-dap"` (default) and
794+
`"debugAdapter": "legacy"` (with Delve v1.7.3 or newer) as well as Delve's
814795
[command-line interface](https://github.com/go-delve/delve/tree/master/Documentation/cli)
815796
via `dlv connect`. The `--accept-multiclient` flag makes this a multi-use server
816797
that persists on `Disconnect` from a client and allows repeated connections from
@@ -837,7 +818,6 @@ Connect to it with a remote attach configuration in your `launch.json`:
837818
{
838819
"name": "Connect to external session",
839820
"type": "go",
840-
"debugAdapter": "dlv-dap", // `legacy` by default
841821
"request": "attach",
842822
"mode": "remote",
843823
"port": 12345,

0 commit comments

Comments
 (0)