Skip to content

Commit 5d3b3f6

Browse files
committed
[release] prepare v0.28.0 release
c0e33de src/goEnvironmentStatus: update hard coded go versions 81f6db9 src/goModules: update example module names to reflect naming guidelines ba2daa3 src/goMain.ts: disable check for active debug session d32a326 package.json: drop minify when packaging cc6f312 src/debugAdapter: let infer path logic handle non-existing files 5a59bbf src/goDebugConfiguration: remote attach should not be warned about port 1d258a2 src/goTest: group test explorer settings, fix bugs 104052d package.json: update gopls settings (v0.7.2) dc044d1 test/integration: write legacy DA trace line-by-line 3a09d5d test/integration: log DAP trace when legacy adapter test fails 9248382 src/config: remove WrappedConfiguration in favor of trusted workspace fb6208d docs: change blog.golang.org to go.dev/blog ab3d3a6 src/goDebugFactory: add --check-go-version=false 9a9ec9a src/goTest: cleanup b9bf001 src/goTest: basic profiling support 850fefd test/integration/goTest: remove unused imports d1d9901 src/goTest: fix test run cancellation 977e93e docs/debugging.md: add FAQ section for next while nexting 6019957 src/goTest: support running sub-tests 9021bff src/goTest: do not set range for dynamic subtests 1c36262 src/goDebugConfiguration: show warning that port is being used 09d4bbe docs/debugging.md: update description of port and host 41279a6 Revert "src/goDebugFactory.ts: direct users to use 'debugServer' for remote" a4c2c4a CHANGELOG.md: prep for v0.27.2 53accf5 src/goDebugFactory: fix debugger launch on Windows e6c2d3c all: change learn.go.dev to go.dev/learn aa3293c src/goDebugConfiguration: massage launch config for debug/test 289839c test/integration/goDebug.test.ts: enable disconnect tests c069def src/goTest: remove unused names e53d60e src/goTest: clean up test ID parsing 3e12e73 src/goTest: split up test explorer a1cc5e5 src/goInstallTools: unpin dlv-dap version, and pick master 2ff7ead src/goTestExplorer: handle stretchr suites 33d814a .github: update issue template to collapse version details ebd07b1 src/goDebugConfiguration+docs: improve dlvLoadConfig communication c3de634 codelens: fix regexps for test funcs names 2f484bd src/goTestExplorer: handle weird doc URIs on load c79e0c4 src/goDebugFactory: increase timeout for dlv dap server start 3f434bd all: bundle with esbuild instead of webpack 83aa2cb src/goTestExplorer: implement a test provider for the new test api 945a47e package.json: recognize *.*tmpl as go template files ad3a6ca all: add support for go.work files as go.mod files 0ff533d tools/relnotes: use types from work-stats package e81d5fc CHANGELOG.md: v0.27.1 change log 46b3efe src/goToolsInformation: use the commit hash to pin dlv-dap version e0a268b package-lock.json: npm audit fix 336b9f7 src/goDebugConfiguration: convert processId to int b4226ab package.json: add support for replay and core debug modes 6060589 docs/debugging.md: add FAQ section 6a6fdb6 src/goDebugFactory: log errors without killing delve process 4e7f6f5 src/goMain: export a small API 8a4731f package.json: start v0.28.0-dev cd72252 package.json: use fileDirname for Launch Package snippet f77de39 CHANGELOG.md: mention the removal of 'port' support in dlv-dap 45b06e0 src/goDebugFactory.ts: direct users to use 'debugServer' for remote Updates #1776 Change-Id: Ifd897cf869e1f1a485026d0631b88b00d2ec83ce
2 parents 5d22417 + c0e33de commit 5d3b3f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+3734
-2094
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ labels: ''
66
assignees: ''
77

88
---
9-
9+
<!--
1010
For asking questions, see:
1111
- [Stack Overflow](https://stackoverflow.com/questions/tagged/go+visual-studio-code)
1212
- [GitHub Discussions (Help)](https://github.com/golang/vscode-go/discussions/categories/help)
@@ -17,8 +17,11 @@ Before filing an issue, please review our troubleshooting guides
1717
* [Troubleshooting other problems](https://github.com/golang/vscode-go/tree/master/docs/troubleshooting.md)
1818
1919
Please answer these questions before submitting your issue. Thanks!
20+
-->
2021

2122
### What version of Go, VS Code & VS Code Go extension are you using?
23+
<details><summary>Version Information</summary><br>
24+
2225
* Run `go version` to get version of Go from _the VS Code integrated terminal_.
2326
- <Paste go version here>
2427
* Run `gopls -v version` to get version of Gopls from _the VS Code integrated terminal_.
@@ -29,6 +32,7 @@ Please answer these questions before submitting your issue. Thanks!
2932
- <Paste Go extension version here>
3033
* Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > `Go: Locate Configured Go Tools` command.
3134
- <Paste the output here>
35+
</details>
3236

3337
### Share the Go related settings you have added/edited
3438

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["connor4312.esbuild-problem-matchers"]
3+
}

.vscode/launch.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"stopOnEntry": false,
2626
"sourceMaps": true,
2727
"smartStep": true,
28-
"preLaunchTask": "npm: webpack",
28+
"preLaunchTask": "npm: bundle-dev",
2929
"env": {
3030
"VSCODE_GO_IN_TEST": "" // Enable code
3131
},
@@ -44,7 +44,7 @@
4444
],
4545
"sourceMaps": true,
4646
"smartStep": true,
47-
"preLaunchTask": "npm: webpack"
47+
"preLaunchTask": "npm: bundle-dev"
4848
},
4949
{
5050
"name": "Launch Extension Tests",
@@ -61,7 +61,8 @@
6161
"999999"
6262
],
6363
"env": {
64-
"VSCODE_GO_IN_TEST": "1" // Disable code that shouldn't be used in test
64+
"VSCODE_GO_IN_TEST": "1", // Disable code that shouldn't be used in test
65+
"MOCHA_TIMEOUT": "999999",
6566
},
6667
"stopOnEntry": false,
6768
"sourceMaps": true,

.vscode/tasks.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,22 @@
5050
"kind": "build",
5151
"isDefault": true
5252
}
53+
},
54+
{
55+
"type": "npm",
56+
"script": "bundle-watch",
57+
"group": "build",
58+
"problemMatcher": "$esbuild-watch",
59+
"isBackground": true,
60+
"presentation": {
61+
"reveal": "never"
62+
}
63+
},
64+
{
65+
"type": "npm",
66+
"script": "bundle-dev",
67+
"group": "build",
68+
"problemMatcher": "$esbuild",
5369
}
5470
]
5571
}

.vscodeignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@ third_party/
1818
tools/
1919
tsconfig.json
2020
typings/
21-
webpack.config.js

docs/commands.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,18 @@ Runs all unit tests in the current file.
5959

6060
Runs all unit tests in the package of the current file.
6161

62+
### `Go Test: Refresh`
63+
64+
Refresh a test in the test explorer. Only available as a context menu option in the test explorer.
65+
66+
### `Go Test: Show Last Profile`
67+
68+
Show last captured profile
69+
70+
### `Go Test: Profile`
71+
72+
Run a test and capture a profile
73+
6274
### `Go: Benchmark Package`
6375

6476
Runs all benchmarks in the package of the current file.

docs/debugging.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,12 @@ Here is the list of attributes specific to Go debugging.
246246
| `dlvFlags` | Extra flags for `dlv`. See `dlv help` for the full list of supported. Flags such as `--log-output`, `--log`, `--log-dest`, `--api-version`, `--output`, `--backend` 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.<br/> | <center>_same as Launch_</center>|
247247
| `env` | Environment variables passed to the program.<br/> | <center>_n/a_</center> |
248248
| `envFile` | Absolute path to a file containing environment variable definitions. Multiple files can be specified by provided an array of absolute paths<br/>(Default: `${workspaceFolder}/.env`)<br/> | <center>_n/a_</center> |
249-
| `host` | The host name of the machine the delve debugger will be listening on.<br/>(Default: `"127.0.0.1"`)<br/> | <center>_same as Launch_</center>|
249+
| `host` | In legacy mode, this will only apply to remote-attach configurations, which will look for "dlv ... --headless --listen=<host>:<port>" server started externally. In dlv-dap mode (which does not yet support remote-attach), this will apply to all other configurations. The extension will try to connect to an external server started with "dlv dap --listen=<host>:<port>" to ask it to launch/attach to the target process.<br/>(Default: `"127.0.0.1"`)<br/> | <center>_same as Launch_</center>|
250250
| `logDest` | dlv's `--log-dest` flag. See `dlv log` for details. Number argument is not allowed. Supported only in `dlv-dap` mode, and on Linux and Mac OS.<br/> | dlv's `--log-dest` flag. See `dlv log` for details. Number argument is not allowed. Supported only in `dlv-dap` mode and on Linux and Mac OS.<br/> |
251251
| `logOutput` | Comma separated list of components that should produce debug output. Maps to dlv's `--log-output` flag. Check `dlv log` for details.<br/><p>Allowed Values: `"debugger"`, `"gdbwire"`, `"lldbout"`, `"debuglineerr"`, `"rpc"`, `"dap"`<br/>(Default: `"debugger"`)<br/> | <center>_same as Launch_</center>|
252252
| `mode` | One of `auto`, `debug`, `test`, `exec`, `replay`, `core`. In `auto` mode, the extension will choose either `debug` or `test` depending on active editor window.<br/><p>Allowed Values: `"auto"`, `"debug"`, `"test"`, `"exec"`, `"replay"`, `"core"`<br/>(Default: `auto`)<br/> | Indicates local or remote debugging. Local maps to the `dlv attach` command, remote maps to `connect`. `remote` is not supported in `dlv-dap` mode currently. Use `host` and `port` instead.<br/><p>Allowed Values: `"local"`, `"remote"`<br/>(Default: `local`)<br/> |
253253
| `output` | Output path for the binary of the debugee.<br/>(Default: `"debug"`)<br/> | <center>_n/a_</center> |
254-
| `port` | The port that the delve debugger will be listening on.<br/>(Default: `2345`)<br/> | <center>_same as Launch_</center>|
254+
| `port` | In legacy mode, this will only apply to remote-attach configurations, which will look for "dlv ... --headless --listen=<host>:<port>" server started externally. In dlv-dap mode (which does not yet support remote-attach), this will apply to all other configurations. The extension will try to connect to an external server started with "dlv dap --listen=<host>:<port>" to ask it to launch/attach to the target process.<br/>(Default: `2345`)<br/> | <center>_same as Launch_</center>|
255255
| `processId` | <center>_n/a_</center> | <br/><p><b>Option 1:</b> Use process picker to select a process to attach, or Process ID as integer.<br/><p>Allowed Values: `"${command:pickProcess}"`, `"${command:pickGoProcess}"`<br/><br/><p><b>Option 2:</b> Attach to a process by name. If more than one process matches the name, use the process picker to select a process.<br/><br/><p><b>Option 3:</b> The numeric ID of the process to be debugged. If 0, use the process picker to select a process.<br/><br/>(Default: `0`)<br/> |
256256
| `program` | Path to the program folder (or any go file within that folder) when in `debug` or `test` mode, and to the pre-built binary file to debug in `exec` mode. If it is not an absolute path, the extension interpretes it as a workspace relative path.<br/>(Default: `"${workspaceFolder}"`)<br/> | <center>_n/a_</center> |
257257
| `remotePath` | <center>_n/a_</center> | (Deprecated) *Use `substitutePath` instead.*<br/>The path to the source code on the remote machine, when the remote path is different from the local machine. If specified, becomes the first entry in substitutePath.<br/>(Default: `""`)<br/> |
@@ -441,6 +441,22 @@ The legacy adapter used `dlvLoadConfig` as one-time session-wide setting to over
441441

442442
Please [open an issue](https://github.com/golang/vscode-go/issues/new) if this is not sufficient for your use case or if you have any additional feedback.
443443

444+
### Why does my debug session have an `invalid command` error when I try to step?
445+
446+
When stepping through a program on a particular goroutine, the debugger will make sure that the step is completed, even when interrupted by events on a different goroutine. If a breakpoint is hit on a different goroutine, the debug adapter will stop the program execution to allow you to inspect the state, even though the step request is still active.
447+
448+
If you attempt to make another step request you will get an `invalid command` error.
449+
450+
<p align="center"><img src="images/invalidCommandExceptionInfo.png" alt="Disable breakpoints from the Breakpoints context menu" width="75%"> </p>
451+
452+
453+
Use `Continue` to resume program execution.
454+
455+
If you do not want the step request to be interrupted, you can disable all breakpoints from VS Code from the context menu in the `Breakpoints` view.
456+
457+
<p align="center"><img src="images/disablebps.png" alt="Disable breakpoints from the Breakpoints context menu" width="75%"> </p>
458+
459+
444460
[Delve]: https://github.com/go-delve/delve
445461
[VS Code variables]: https://code.visualstudio.com/docs/editor/variables-reference
446462
[snippets]: https://code.visualstudio.com/docs/editor/userdefinedsnippets

docs/gopath.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ directories. Your code is typically located in the `$GOPATH/src` directory.
88
If you are not familiar with Go and `GOPATH`, please first read about [writing
99
Go code with `GOPATH`](https://golang.org/doc/gopath_code.html#GOPATH).
1010

11-
**If you are just starting out with Go, we recommend [using Go modules](https://blog.golang.org/using-go-modules) instead of GOPATH.**
11+
**If you are just starting out with Go, we recommend [using Go modules](https://go.dev/blog/using-go-modules) instead of GOPATH.**
1212

1313
## Overview
1414

@@ -82,4 +82,4 @@ This can be done by setting [`"go.toolsGopath"`](settings.md#go.toolsGopath) to
8282

8383
The extension will fall back to your existing `GOPATH` if tools are not found in the [`go.toolsGopath`](settings.md#go.toolsGopath) directory.
8484

85-
[Go modules]: https://blog.golang.org/using-go-modules
85+
[Go modules]: https://go.dev/blog/using-go-modules

docs/images/disablebps.png

111 KB
Loading
81.9 KB
Loading

0 commit comments

Comments
 (0)