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
The following is the output of
git log --oneline --no-decorate --cherry-pick release..master
Some commits were already cherry-picked and released in v0.19.1.
6e8bbba build: run vsce package during testing
cf03db6 package.json: update gopls settings based on gopls v0.6.0
1985e90 docs/settings.md: add description of object type settings' properties
4b24e75 package.json: add go.toolsManagement.checkForUpdates
63b4bd1 tools/generate: include deprecationMessage
9fcd568 test: remove symlink tests for substitutePath
0dee1a8 src/goInstallTools: fix broken gocode-gomod install
1812139 src/goLanguageServer: disable language service on guest side completely
a1ed38c snippets: add snippet for type function declaration
211c7a6 src/goLanguageServer.ts: update gopls when gopls is turned on by default
93f32bb src/debugAdapter: add substitutePath config for debugging
8b7bc62 src/goLanguageServer: show language server start progress
b950da5 test: increase timeout for extension tests
bb26907 src/goInstallTools: stop requiring to install legacy tools
a9f7034 CHANGELOG: v0.19.1 change
6407dc1 test: fix resolve file names in logs tests for GOPATH
27a25c4 test: fix remote attach tests on windows long tests
43afbf2 src/goInstallTools: fix gocode-gomod installation path
2a643de src/goInstallTools: add reference for incorrect PATH issue
8511760 src/pathUtils: check /usr/local/bin/go for go
a6d5d51 src/goDebugConfiguration.ts: offer quick pick menu for creating launch.json
da0f1c6 src/goLanguageServer: enable user survey in stable version.
4e42d93 package.json: declare gopls settings as a one property
685e302 src/goLanguageServer: change back revealOutputChannelOn to Never
203dbe9 [master] update CHANGELOG for v0.19.0
4fee2d6 src/goLanguageServer: improve automated gopls log collection
f379f50 src/goLanguageServer: prompt users to file an issue if they opted out
49bca83 package.json: mark settings that are not applicable when using gopls
650b8ae src/goDebug: check for undefined launchArgs.packagePathToGoModMap
e2d78f1 src/goDebug: fix noDebug mode for windows
e8d462e snippets: avoid using "var" as default name in snippets
cecb575 package.json: embed autogenerated gopls settings
98e508a tools/goplssetting: use text note instead of emoji for section
8ea68d8 src/testUtils: adjust file path expansion regexp to capture subtest failures
795bf32 package.json: Add "template" property to go.addTags configuration
f6c5b08 .github/workflows: update to use env file instead of set-env
dd08b76 src/goLanguageServer: suggest updating gopls before filing an issue
9dd4a94 webpack.config.js: ignore warnings from yargs dependency
15a6a04 .github/ISSUE_TEMPLATE: request gopls version
Change-Id: Ia0754df12a8b4b2dcf3f02456fe452623d14b6a0
- Set "trace": "log" and share the resulting logs in the debug console when logging an issue.
20
21
@@ -23,9 +24,11 @@ Please answer these questions before submitting your issue. Thanks!
23
24
### What version of Go, VS Code & VS Code Go extension are you using?
24
25
- Run `go version` to get version of Go
25
26
- <Paste go version here>
27
+
- Run `gopls -v version` to get version of Gopls if you are using [the language server](https://github.com/golang/vscode-go/blob/master/docs/gopls.md).
28
+
- <Paste gopls version here>
26
29
- Run `code -v` or `code-insiders -v` to get version of VS Code or VS Code Insiders
27
30
- <Paste VS Code version here>
28
-
- Check your installed extensions to get the version of the VS Code Go extension
31
+
- Check your installed extensions to get the version of the VS Code Go extension
29
32
- <Paste Go extension version here>
30
33
- Run `go env` to get the go development environment details
Copy file name to clipboardExpand all lines: docs/debugging.md
+41-4Lines changed: 41 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,7 +110,8 @@ args | Array of command-line arguments to pass to the program being debugg
110
110
showLog | If `true`, Delve logs will be printed in the Debug Console panel.
111
111
logOutput | Comma-separated list of Delve components (`debugger`, `gdbwire`, `lldbout`, `debuglineerr`, `rpc`) that should produce debug output when `showLog` is `true`.
112
112
buildFlags | Build flags to pass to the Go compiler.
113
-
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.
113
+
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.
114
+
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)(https://github.com/go-delve/delve/tree/master/Documentation/cli#config)) configuration, and will eventually configure substitute-path in Delve directly.
114
115
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.
115
116
processId | This is the process ID of the executable you want to debug. Applicable only when using the `attach` request in `local` mode.
116
117
@@ -308,7 +309,27 @@ Then, create a remote debug configuration in your `launch.json`.
308
309
309
310
In the example, the VS Code debugger will run on the same machine as the headless `dlv` server. Make sure to update the `port` and `host` settings to point to your remote machine.
310
311
311
-
`remotePath` should point to the absolute path of the program being debugged in the remote machine. `cwd` should point to the absolute path of the working directory of the program being debugged on your local machine. This should be the counterpart of the folder in `remotePath`. See [golang/vscode-go#45](https://github.com/golang/vscode-go/issues/45) for updates regarding `remotePath` and `cwd`.
312
+
`remotePath` should point to the absolute path of the program being debugged in the remote machine. `cwd` should point to the absolute path of the working directory of the program being debugged on your local machine. This should be the counterpart of the folder in `remotePath`. See [golang/vscode-go#45](https://github.com/golang/vscode-go/issues/45) for updates regarding `remotePath` and `cwd`. You can also use the equivalent `substitutePath` configuration.
313
+
314
+
```json5
315
+
{
316
+
"name":"Launch remote",
317
+
"type":"go",
318
+
"request":"attach",
319
+
"mode":"remote",
320
+
"substitutePath": [
321
+
{
322
+
"from":"/absolute/path/dir/on/local/machine",
323
+
"to":"/absolute/path/dir/on/remote/machine",
324
+
},
325
+
],
326
+
"port":2345,
327
+
"host":"127.0.0.1",
328
+
"cwd":"/absolute/path/dir/on/local/machine",
329
+
}
330
+
```
331
+
332
+
If you do not set, `remotePath` or `substitutePath`, then the debug adapter will attempt to infer the path mappings. See [golang/vscode-go#45](https://github.com/golang/vscode-go/issues/45) for more information.
312
333
313
334
When you run the `Launch remote` target, VS Code will send debugging commands to the `dlv` server you started, instead of launching it's own `dlv` instance against your program.
314
335
@@ -405,9 +426,25 @@ This error can show up for Mac users using Delve versions 0.12.2 and above. `xco
405
426
406
427
### Debugging symlink directories
407
428
408
-
This extension does not provide support for debugging projects containing symlinks. Make sure that you are setting breakpoints in the files that Go will use to compile your program.
429
+
Since the debugger and go compiler use the actual filenames, extra configuration is required to debug symlinked directories. Use the `substitutePath` property to tell the debugAdapter how to properly translate the paths. For example, if your project lives in `/path/to/actual/helloWorld`, but the project is open in vscode under the linked folder `/path/to/hello`, you can add the following to your config to set breakpoints in the files in `/path/to/hello`:
430
+
431
+
```json5
432
+
{
433
+
"name":"Launch remote",
434
+
"type":"go",
435
+
"request":"launch",
436
+
"mode":"auto",
437
+
"program":"/path/to/hello",
438
+
"substitutePath": [
439
+
{
440
+
"from":"/path/to/hello",
441
+
"to":"/path/to/actual/helloWorld",
442
+
},
443
+
],
444
+
}
445
+
```
409
446
410
-
For updates to symlink support reference [golang/vscode-go#622](https://github.com/golang/vscode-go/issues/622).
447
+
This extension does not provide general support for debugging projects containing symlinks. If `substitutePath` does not meet your needs, please consider commenting on this issue that contains updates to symlink support reference [golang/vscode-go#622](https://github.com/golang/vscode-go/issues/622).
0 commit comments