docs: update the debugging doc about remote mode default adapter
From v0.41.0, we are switching the default to dlv-dap.
Fixes golang/vscode-go#2205
Change-Id: Iaef25bd94620fd74e7721ab7a55721a9f4f91355
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/562678
Commit-Queue: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
diff --git a/docs/debugging-legacy.md b/docs/debugging-legacy.md
index 6af77db..734b6c5 100644
--- a/docs/debugging-legacy.md
+++ b/docs/debugging-legacy.md
@@ -2,7 +2,7 @@
The Go extension historically used a small adapter program to work with the Go debugger, [Delve].
The extension transitioned to communicate with [Delve] directly but there are still cases you may
-need to use the legacy debug adapter (e.g. remote debugging). This document explains how to use the
+need to use the legacy debug adapter. This document explains how to use the
***legacy*** debug adapter.
@@ -45,8 +45,6 @@
```
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.
-For [Remote Debugging](#remote-debugging) (launch configuration with `"mode": "remote"` attribute),
-the extension will use the `"legacy"` mode by default, so setting this attribute won't be necessary.
Throughout this document, we assume that you opted in to use the legacy debug adapter.
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).
diff --git a/docs/debugging.md b/docs/debugging.md
index 643e9a3..044519f 100644
--- a/docs/debugging.md
+++ b/docs/debugging.md
@@ -6,26 +6,8 @@
[VS Code’s Debugging UI](https://code.visualstudio.com/docs/editor/debugging).
These debugging features are possible by using
-[Delve](https://github.com/go-delve/delve), the Go debugger.
-
-Previously, the Go extension communicated with Delve through a custom debug
-adaptor program (`legacy` mode). Since
-[`Delve`'s native debug adapter implementation](https://github.com/go-delve/delve/tree/master/service/dap)
-is available, the Go extension is transitioning to deprecate the legacy debug
-adapter in favor of direct communication with Delve via
-[DAP](https://microsoft.github.io/debug-adapter-protocol/overview).
-
-
- 📣 **We are happy to announce that the new _`dlv-dap`_ mode of Delve
- integration is enabled for _local_ _debugging_ by default. For
- [_remote_ _debugging_](#remote-debugging) it is the default in
- [Go Nightly](nightly.md) and is available with stable builds on demand with
- `"debugAdapter": "dlv-dap"` attribute in `launch.json` or `settings.json`!**
-
-Many features and settings described in this document may be available only with
-the new `dlv-dap` mode. For troubleshooting and configuring the legacy debug
-adapter, see
-[the legacy debug adapter documentation](https://github.com/golang/vscode-go/tree/master/docs/debugging-legacy.md).
+[Delve](https://github.com/go-delve/delve), the Go debugger, and its
+[native debug adapter implementation](https://github.com/go-delve/delve/tree/master/service/dap).
## Get started
@@ -82,7 +64,9 @@
### Switch to legacy debug adapter
-Note: The extension still uses the legacy debug adapter for remote debugging.
+Previously, the Go extension communicated with Delve through a custom debug
+adaptor program (aka `legacy` mode). This legacy adapter is no longer maintained
+and will be removed by the end of 2024 H2.
If you need to use the legacy debug adapter for local debugging (`legacy` mode)
by default, add the following in your VSCode settings.
@@ -93,9 +77,6 @@
}
```
-When `mode` is set to `remote` you must explicitly set `debugAdapter` to
-`dlv-dap` to override the legacy adapter default.
-
If you want to switch to `legacy` for only a subset of your launch
configurations, you can use
[the `debugAdapter` attribute](#launchjson-attributes) to switch between
@@ -809,8 +790,8 @@
The
[headless dlv server](https://github.com/go-delve/delve/tree/master/Documentation/api)
-can now be used with both `"debugAdapter": "legacy"` (default value) and
-`"debugAdapter": "dlv-dap"` (with Delve v1.7.3 or newer) as well as Delve's
+can now be used with both `"debugAdapter": "dlv-dap"` (default) and
+`"debugAdapter": "legacy"` (with Delve v1.7.3 or newer) as well as Delve's
[command-line interface](https://github.com/go-delve/delve/tree/master/Documentation/cli)
via `dlv connect`. The `--accept-multiclient` flag makes this a multi-use server
that persists on `Disconnect` from a client and allows repeated connections from
@@ -837,7 +818,6 @@
{
"name": "Connect to external session",
"type": "go",
- "debugAdapter": "dlv-dap", // `legacy` by default
"request": "attach",
"mode": "remote",
"port": 12345,