You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Copy file name to clipboardExpand all lines: .github/ISSUE_TEMPLATE/feature_request.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,8 +7,6 @@ assignees: ''
7
7
8
8
---
9
9
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
-
12
10
**Is your feature request related to a problem? Please describe.**
13
11
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Copy file name to clipboardExpand all lines: docs/debugging.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ There are some common cases when you might want to tweak the Delve configuration
78
78
79
79
## Launch Configurations
80
80
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.
82
82
83
83
```json5
84
84
{
@@ -109,10 +109,11 @@ program | In `test` or `debug` mode, this refers to the absolute path to the
109
109
env | Environment variables to use when debugging. Use the format: `{ "NAME": "VALUE" }`. Not applicable to `attach` requests.
110
110
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.
111
111
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.
113
113
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.
114
115
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.
116
117
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.
117
118
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.
118
119
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
🎉 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.
57
57
58
58
* 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))
59
60
* Fixed handling of maps with compound keys
60
61
* Improved CALL STACK presentation
61
62
* 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.
69
70
70
71
⚒️ The following features are still under development.
71
72
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.
75
76
*`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.
77
78
78
79
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.
79
80
@@ -87,7 +88,7 @@ When you are having issues in `dlv-dap` mode, first check if the problems are re
87
88
Please report issues in [our issue tracker](https://github.com/golang/vscode-go/issues) with the following information.
88
89
89
90
*`go version`
90
-
*`go version -m dlv-dap`
91
+
*`go version -m <path/to/dlv-dap>`
91
92
* VS Code and VS Code Go version.
92
93
* Instruction to reproduce the issue (code snippets, your `launch.json`, screenshot)
93
94
@@ -106,7 +107,7 @@ For simple launch cases, build the delve binary, and configure `"go.alternateToo
106
107
}
107
108
```
108
109
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.
110
111
```json5
111
112
{
112
113
"name":"Launch file",
@@ -118,6 +119,19 @@ Set `logOutput` and `showLog` attributes in `launch.json` to enable logging and
118
119
}
119
120
```
120
121
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
+
121
135
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.
Copy file name to clipboardExpand all lines: docs/settings.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -144,7 +144,7 @@ Delve settings that applies to all debugging sessions. Debug configuration in th
144
144
| --- | --- |
145
145
|`apiVersion`| Delve Api Version to use. Default value is 2. <br/> Allowed Options: `1`, `2` <br/> Default: `2`|
146
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"`|
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>} ```|
148
148
|`showGlobalVariables`| Boolean value to indicate whether global package variables should be shown in the variables pane or not. <br/> Default: `false`|
0 commit comments