Skip to content

Commit 30d1867

Browse files
committed
[release] prepare v0.25.0 release
c7fcd42 .github/workflows: change tabs to spaces f5ef2de .github/workflows: install stable delve version for testing c522170 test/integration/goDebug.test.ts: fix listening for output event ad0e420 src/goDebugFactory: log console message with info level 07fe3d3 src/goDebugFactory: disable logDest support on windows a7f91bb src/goTools: update dlv-dap version 4e3fc58 src/goMain: overwrite process.env[GOROOT] if go.goroot is set 730d202 test/integration/goDebug: make logDest file less flaky a73da23 test/integration/goDebug: output trace for dlv dap cleanup test c807011 Revert "Revert "src/goDebugFactory: use --log-dest to capture dlv logs and add logDest"" 7bfa543 src/goLanguageServer: disable the language features for unrecognized workspace types a031e96 src/goDebugConfiguration.ts: use `program` to determine mode if file 9005b0c package.json: recognize 'stopOnEntry' in attach mode 8fa9dbd src/goDebugConfiguration.ts: disable warning about using 'cwd' in dap cdbf062 goLanguageServer: only prompt for the survey when working on Go code 5f1faa3 goSurvey: pull survey logic out of goLanguageServer.ts b1cb6c5 src/util: adjust go dev version regex ae07a73 test/integration/goDebug.test.ts: set 'output' for tests bdd4acd src/goLanguageServer: prompt for the survey regardless of gopls usage e3bcd86 src/goDebugFactory: send SIGINT to delve and avoid treekill acc65d3 src/goDebugConfiguration.ts: show warning for dlv-dap with dlvLoadConfig 7a1a338 test/integration/goDebug: don't wait for debug client to stop in teardown 4463476 test/integration/goDebug: get goroutines reliably in switch goroutine test 57ba505 debugAdapter: fix missing file bug for remote debugging c5ca0dc test/integration/goDebug: skip more remote attach tests a496b7a test/integration/goDebug: skip remote attach tests 78b5f53 test/integration/goDebug: verify goroutines running before switch 5e9eef4 Revert "src/goDebugFactory: use --log-dest to capture dlv logs and add logDest" 71410c4 src/goDebugFactory: use --log-dest to capture dlv logs and add logDest b2f6fcf test/integration: disable broken setSelectedGo test 64ad2e0 src/goDebugFactory: start dlv dap process early 2e81d29 .github: stop sending feature requests to discussions/slacks 2875e05 package.json: add command to run 'go mod init' 5bcfcac test/integration/goDebug: set mode to 'debug' or 'test' not 'auto' 9bc6048 test/integration/goDebug.ts: check for incorrect output event noDebug b7797c3 src/goDebugConfiguration.ts: replace resolvePath with resolveHomeDir ec08530 src/debugAdapter: accept additional trace levels 5639184 src/welcome: avoid vscode.Uri.joinPath aabfc9f src/goTools: update dlv-dap @v1.6.1-0.20210419181450-2408ed87bf87 5efb087 test/integration/statusbar: fix/delete broken tests e0e1e60 src/goDebugFactory: send teardown log to Go Debug channel cfc787e src/goDebugFactory: add GoDebugAdapterTrackerFactory 8755d84 src/goLogging: extend logging facility afa59f6 src/goTest.ts: add debug previous command 015d002 src/goInstallTools: use GOBIN correctly installing dlv-dap/gocode-gomod 10509fb src/goCheck: add missing goplsConfig parameter to goLint 4b6f857 package.json: set editor.suggest.snippetsPreventQuickSuggestions to false a9b31d9 [release] Update CHANGELOG and LICENSE for v0.24.1 86f704a src/goDebugConfiguration: auto update dlv-dap if autoUpdates enabled bd55732 src/goDebugFactory.ts: send the first error when starting dlv-dap f607db9 test/runTest: stop creating ${workspaceFolder} directory Change-Id: I89fc378ea4a30900fc3bda5fc11aedc6bcff71f4
2 parents 9303a03 + c7fcd42 commit 30d1867

36 files changed

+1188
-692
lines changed

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ assignees: ''
77

88
---
99

10-
If you have a feature request, please share your idea on the [GitHub Discussion](https://github.com/golang/vscode-go/discussions/categories/ideas), or on the [`#vscode` channel](https://invite.slack.golangbridge.org/messages/vscode) in Gophers Slack first.
11-
1210
**Is your feature request related to a problem? Please describe.**
1311
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
1412

.github/workflows/release-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
go get github.com/ramya-rao-a/go-outline
6666
go get github.com/go-delve/delve/cmd/dlv@master
6767
cp "${HOME}/go/bin/dlv${{env.EXT}}" "${HOME}/go/bin/dlv-dap${{env.EXT}}"
68-
68+
go get github.com/go-delve/delve/cmd/dlv
6969
env:
7070
GO111MODULE: on
7171
EXT: "${{ matrix.os == 'windows-latest' && '.exe' || ''}}"

.github/workflows/test-long-all.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
go get github.com/ramya-rao-a/go-outline
6262
go get github.com/go-delve/delve/cmd/dlv@master
6363
cp "${HOME}/go/bin/dlv${{env.EXT}}" "${HOME}/go/bin/dlv-dap${{env.EXT}}"
64-
64+
go get github.com/go-delve/delve/cmd/dlv
6565
env:
6666
GO111MODULE: on
6767
EXT: "${{ matrix.os == 'windows-latest' && '.exe' || ''}}"

.github/workflows/test-long.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
go get github.com/ramya-rao-a/go-outline
6161
go get github.com/go-delve/delve/cmd/dlv@master
6262
cp "${HOME}/go/bin/dlv${{env.EXT}}" "${HOME}/go/bin/dlv-dap${{env.EXT}}"
63+
go get github.com/go-delve/delve/cmd/dlv
6364
env:
6465
GO111MODULE: on
6566
EXT: "${{ matrix.os == 'windows-latest' && '.exe' || ''}}"

.github/workflows/test-smoke.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ jobs:
5858
go get github.com/ramya-rao-a/go-outline
5959
go get github.com/go-delve/delve/cmd/dlv@master
6060
cp "${HOME}/go/bin/dlv${{env.EXT}}" "${HOME}/go/bin/dlv-dap${{env.EXT}}"
61+
go get github.com/go-delve/delve/cmd/dlv
6162
env:
6263
GO111MODULE: on
6364
EXT: "${{ matrix.os == 'windows-latest' && '.exe' || ''}}"

docs/commands.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ Runs all unit tests from all packages in the current workspace.
7171

7272
Re-runs the last executed test.
7373

74+
### `Go: Debug Previous`
75+
76+
Re-runs the last debugged test run through a codelens or "Go: Debug Test at Cursor" command.
77+
7478
### `Go: Toggle Test Coverage In Current Package`
7579

7680
Displays test coverage in the current package.
@@ -175,6 +179,10 @@ Build the current workspace.
175179

176180
Install the current package.
177181

182+
### `Go: Initialize go.mod`
183+
184+
Run `go mod init` in the workspace folder.
185+
178186
### `Go: Cancel Running Tests`
179187

180188
Cancels running tests.

docs/debugging.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ There are some common cases when you might want to tweak the Delve configuration
7878

7979
## Launch Configurations
8080

81-
To get started debugging, run the command `Debug: Open launch.json`. If you did not already have a `launch.json` file for your project, this will create one for you. It will contain this default configuration, which can be used to debug the current package.
81+
To get started debugging, run the command `Debug: Open launch.json`. If you did not already have a `launch.json` file for your project, this will create one for you. It will contain this default configuration, which can be used to debug the current package. With mode `auto`, the file that is currently open will determine whether to debug the program as a test. If `program` is instead set to a Go file, that file will determine which mode to run in.
8282

8383
```json5
8484
{
@@ -109,10 +109,11 @@ program | In `test` or `debug` mode, this refers to the absolute path to the
109109
env | Environment variables to use when debugging. Use the format: `{ "NAME": "VALUE" }`. Not applicable to `attach` requests.
110110
envFile | Absolute path to a file containing environment variable definitions. The environment variables passed in via the `env` property override the ones in this file.
111111
args | Array of command-line arguments to pass to the program being debugged.
112-
showLog | If `true`, Delve logs will be printed in the Debug Console panel. This corresponds to `dlv`'s `--log` flag.
112+
showLog | If `true` and `logDest` is not set, Delve logs will be printed in the Debug Console panel. If `true` and `logDest` is set, logs will be written to the `logDest` file. This corresponds to `dlv`'s `--log` flag.
113113
logOutput | Comma-separated list of Delve components (`debugger`, `gdbwire`, `lldbout`, `debuglineerr`, `rpc`) that should produce debug output when `showLog` is `true`. This corresponds to `dlv`'s `--log-output` flag.
114+
logDest | Absolute path to the delve log output file. This corresponds to `dlv`'s `--log-dest` flag, but number (used for file descriptor) is disallowed. Supported only in dlv-dap mode on Linux and Mac.
114115
buildFlags | Build flags to pass to the Go compiler. This corresponds to `dlv`'s `--build-flags` flag.
115-
dlvFlags | Extra flags passed to `dlv`. See `dlv help` for the full list of supported flags. This is useful when users need to pass less commonly used or new flags such as `--only-same-user`, `--check-go-version`. Note that some flags such as `--log-output`, `--log`, `--init`, `--api-version` already have corresponding properties in the debug configuration, and flags such as `--listen` and `--headless` are used internally. If they are specified in `dlvFlags`, they may be ignored or cause an error.
116+
dlvFlags | Extra flags passed to `dlv`. See `dlv help` for the full list of supported flags. This is useful when users need to pass less commonly used or new flags such as `--only-same-user`, `--check-go-version`. Note that some flags such as `--log-output`, `--log`, `--log-dest`, `--init`, `--api-version` already have corresponding properties in the debug configuration, and flags such as `--listen` and `--headless` are used internally. If they are specified in `dlvFlags`, they may be ignored or cause an error.
116117
remotePath | If remote debugging (`mode`: `remote`), this should be the absolute path to the package being debugged on the remote machine. See the section on [Remote Debugging](#remote-debugging) for further details. [golang/vscode-go#45](https://github.com/golang/vscode-go/issues/45) is also relevant. Becomes the first mapping in substitutePath.
117118
substitutePath | An array of mappings from an absolute local path to an absolute 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. The mappings are applied in order, and the first matching mapping is used. This can be used to map files that have moved since the program was built, different remote paths, and symlinked files or directories. This is intended to be equivalent to the [substitute-path](https://github.com/go-delve/delve/tree/master/Documentation/cli#config) configuration, and will eventually configure substitute-path in Delve directly.
118119
cwd | The working directory to be used in running the program. If remote debugging (`mode`: `remote`), this should be the absolute path to the working directory being debugged on the local machine. See the section on [Remote Debugging](#remote-debugging) for further details. [golang/vscode-go#45](https://github.com/golang/vscode-go/issues/45) is also relevant.
@@ -437,7 +438,7 @@ Since the debugger and go compiler use the actual filenames, extra configuration
437438
"name": "Launch remote",
438439
"type": "go",
439440
"request": "launch",
440-
"mode": "auto",
441+
"mode": "debug",
441442
"program": "/path/to/hello",
442443
"substitutePath": [
443444
{

docs/dlv-dap.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ $ mv /tmp/dlv $GOPATH/bin/dlv-dap
5656
🎉 The new debug adapter offers many improvements and fixes bugs that existed in the old adapter. [Here](https://github.com/golang/vscode-go/issues?q=is%3Aissue+label%3Afixedindlvdaponly) is a partial list of enhancement/fixes available only in the new adapter.
5757

5858
* User-friendly inlined presentation of variables of all complex types (map, struct, pointer, array, slice, ...)
59+
* Auto-loading of nested variables without extra configuration. (See [delve PR/2455](https://github.com/go-delve/delve/pull/2455#issuecomment-827884652))
5960
* Fixed handling of maps with compound keys
6061
* Improved CALL STACK presentation
6162
* Fixed automated "Add to Watch" / "Copy as Expression" expressions.
@@ -69,11 +70,11 @@ Because it is native, we hope for improvement in speed and reliability.
6970

7071
⚒️ The following features are still under development.
7172

72-
* Stop/pause/restart while the debugged program is running does not work yet.
73-
* Cannot be used with `debug test` codelens.
74-
* Support for `"dlvFlags"` attributes in launch configuration is not available.
73+
* Pause/restart while the debugged program is running does not work yet.
74+
* Setting breakpoints while the debugged program is running does not work yet.
75+
* `SetVariable` does not work yet.
7576
* `dlvLoadConfig` to configure max string/bytes length in [`"go.delveConfig"`](https://github.com/golang/vscode-go/blob/master/docs/debugging.md#configuration) does not work.
76-
* [Remote debugging](https://github.com/golang/vscode-go/blob/master/docs/debugging.md#remote-debugging) is not supported.
77+
* Traditional [remote debugging](https://github.com/golang/vscode-go/blob/master/docs/debugging.md#remote-debugging) is not supported.
7778

7879
Follow along with [golang/vscode-go#23](https://github.com/golang/vscode-go/issues/23) and the [project dashboard](https://github.com/golang/vscode-go/projects/3) for updates on the implementation.
7980

@@ -87,7 +88,7 @@ When you are having issues in `dlv-dap` mode, first check if the problems are re
8788
Please report issues in [our issue tracker](https://github.com/golang/vscode-go/issues) with the following information.
8889

8990
* `go version`
90-
* `go version -m dlv-dap`
91+
* `go version -m <path/to/dlv-dap>`
9192
* VS Code and VS Code Go version.
9293
* Instruction to reproduce the issue (code snippets, your `launch.json`, screenshot)
9394

@@ -106,7 +107,7 @@ For simple launch cases, build the delve binary, and configure `"go.alternateToo
106107
}
107108
```
108109

109-
Set `logOutput` and `showLog` attributes in `launch.json` to enable logging and DAP message tracing.
110+
Set `logOutput` and `showLog` attributes in `launch.json` to enable `dlv'-side logging and DAP message tracing.
110111
```json5
111112
{
112113
"name": "Launch file",
@@ -118,6 +119,19 @@ Set `logOutput` and `showLog` attributes in `launch.json` to enable logging and
118119
}
119120
```
120121

122+
Set `trace` attribute to control the verbosity of debug extension's logging.
123+
The logging will appear in the `Go Debug` output channel (Command Palette -> "View: Toggle Output" -> Select "Go Debug" from the dropdown menu).
124+
125+
```json5
126+
{
127+
"name": "Launch file",
128+
"type": "go",
129+
"debugAdapter": "dlv-dap",
130+
"trace": "verbose",
131+
...
132+
}
133+
```
134+
121135
If you are having issues with seeing logs and or suspect problems in extension's integration, you can start Delve DAP server from a separate terminal and configure the extension to directly connect to it.
122136

123137
```

docs/settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ Delve settings that applies to all debugging sessions. Debug configuration in th
144144
| --- | --- |
145145
| `apiVersion` | Delve Api Version to use. Default value is 2. <br/> Allowed Options: `1`, `2` <br/> Default: `2` |
146146
| `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"` |
147-
| `dlvLoadConfig` | LoadConfig describes to delve, how to load values from target's memory <br/> Default: ``` { <pre>"followPointers" : true,<br/>"maxArrayValues" : 64,<br/>"maxStringLen" : 64,<br/>"maxStructFields" : -1,<br/>"maxVariableRecurse" : 1,</pre>} ``` |
147+
| `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

150150
Default:

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)