Skip to content

Commit a6066b7

Browse files
committed
docs: move dlv-dap to debugging, debugging to debugging-legacy
Updated code that referenced dlv-dap.md. Updated default values in package.json. Updated tools/generate.go to use docs/debugging.md. Updates #1657 Change-Id: I2f8dc6e1a465514a9f0db273cfce6910447ccc9e Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/339098 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]>
1 parent ed64853 commit a6066b7

File tree

9 files changed

+802
-795
lines changed

9 files changed

+802
-795
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ provides rich language support for the
99
[Go programming language](https://golang.org/).
1010

1111

12-
> 📣 Debugging using [`Delve`'s native DAP implementation](https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md) is now available for use.<br>
13-
> Please test it by following [the instruction to enable this new feature](https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md#getting-started) and share your feedback!
12+
> 📣 Debugging using [`Delve`'s native DAP implementation](https://github.com/golang/vscode-go/blob/master/docs/debugging.md) is enabled by default in v0.27.0.<br>
1413
1514
## Quick Start
1615

docs/debugging-legacy.md

Lines changed: 458 additions & 0 deletions
Large diffs are not rendered by default.

docs/debugging.md

Lines changed: 331 additions & 318 deletions
Large diffs are not rendered by default.

docs/dlv-dap.md

Lines changed: 4 additions & 467 deletions
Large diffs are not rendered by default.

docs/settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Delve settings that applies to all debugging sessions. Debug configuration in th
143143
| Properties | Description |
144144
| --- | --- |
145145
| `apiVersion` | Delve Api Version to use. Default value is 2. <br/> Allowed Options: `1`, `2` <br/> Default: `2` |
146-
| `debugAdapter` | Select which debug adapter to use by default. This is also used for choosing which debug adapter to use when no launch.json is present and with codelenses. <br/> Allowed Options: `legacy`, `dlv-dap` <br/> Default: `"legacy"` |
146+
| `debugAdapter` | Select which debug adapter to use by default. This is also used for choosing which debug adapter to use when no launch.json is present and with codelenses. <br/> Allowed Options: `legacy`, `dlv-dap` <br/> Default: `"dlv-dap"` |
147147
| `dlvLoadConfig` | LoadConfig describes to delve, how to load values from target's memory. Ignored by 'dlv-dap'. <br/> Default: ``` { <pre>"followPointers" : true,<br/>"maxArrayValues" : 64,<br/>"maxStringLen" : 64,<br/>"maxStructFields" : -1,<br/>"maxVariableRecurse" : 1,</pre>} ``` |
148148
| `showGlobalVariables` | Boolean value to indicate whether global package variables should be shown in the variables pane or not. <br/> Default: `false` |
149149
| `substitutePath` | An array of mappings from a local path to the remote path that is used by the debuggee. The debug adapter will replace the local path with the remote path in all of the calls. Overriden by `remotePath` (in attach request). |

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@
538538
"dlv-dap"
539539
],
540540
"description": "Select which debug adapter to use with this launch configuration.",
541-
"default": "legacy"
541+
"default": "dlv-dap"
542542
},
543543
"program": {
544544
"type": "string",
@@ -749,7 +749,7 @@
749749
"dlv-dap"
750750
],
751751
"description": "Select which debug adapter to use with this launch configuration.",
752-
"default": "legacy"
752+
"default": "dlv-dap"
753753
},
754754
"processId": {
755755
"anyOf": [
@@ -1746,7 +1746,7 @@
17461746
"dlv-dap"
17471747
],
17481748
"description": "Select which debug adapter to use by default. This is also used for choosing which debug adapter to use when no launch.json is present and with codelenses.",
1749-
"default": "legacy"
1749+
"default": "dlv-dap"
17501750
},
17511751
"substitutePath": {
17521752
"type": "array",

src/goDebugFactory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ function spawnDlvDapServerProcess(
355355
`Couldn't find dlv-dap at the Go tools path, ${process.env['GOPATH']}${
356356
env['GOPATH'] ? ', ' + env['GOPATH'] : ''
357357
} or ${envPath}\n` +
358-
'Follow the setup instruction in https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md#getting-started.\n'
358+
'Follow the setup instruction in https://github.com/golang/vscode-go/blob/master/docs/debugging.md#getting-started.\n'
359359
);
360360
throw new Error('Cannot find Delve debugger (dlv dap)');
361361
}

src/goInstallTools.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,8 @@ export async function promptForMissingTool(toolName: string) {
362362
let msg = `The "${tool.name}" command is not available.
363363
Run "go get -v ${getImportPath(tool, goVersion)}" to install.`;
364364
if (tool.name === 'dlv-dap') {
365-
msg = `The ["${tool.name}"](https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md) command is not available.
366-
Please select "Install", or follow the installation instructions [here](https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md#updating-dlv-dap).`;
365+
msg = `The ["${tool.name}"](https://github.com/golang/vscode-go/blob/master/docs/debugging.md) command is not available.
366+
Please select "Install", or follow the installation instructions [here](https://github.com/golang/vscode-go/blob/master/docs/debugging.md#updating-dlv-dap).`;
367367
}
368368

369369
const selected = await vscode.window.showErrorMessage(msg, ...installOptions);

tools/generate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ func main() {
220220

221221
b.Reset()
222222
generateDebugConfigTable(b, pkgJSON)
223-
rewriteDebugDoc(filepath.Join(dir, "docs", "dlv-dap.md"), b.Bytes())
223+
rewriteDebugDoc(filepath.Join(dir, "docs", "debugging.md"), b.Bytes())
224224

225225
// Only update the latest tool versions if the flag is set.
226226
if !*updateLatestToolVersionsFlag {

0 commit comments

Comments
 (0)