diff --git a/docs/debugging.md b/docs/debugging.md index 72af2f6260..bae73b98b6 100644 --- a/docs/debugging.md +++ b/docs/debugging.md @@ -460,14 +460,14 @@ Here is the list of attributes specific to Go debugging. | `output` | Output path for the binary of the debugee.
(Default: `"debug"`)
|
_n/a_
| | `port` | When applied to remote-attach configurations, will look for "dlv ... --headless --listen=:" server started externally. In dlv-dap mode this will apply to all other configurations as well. The extension will try to connect to an external server started with "dlv dap --listen=:" to ask it to launch/attach to the target process.
(Default: `2345`)
| When applied to remote-attach configurations, will look for "dlv ... --headless --listen=:" server started externally. In dlv-dap mode, this will apply to all other configurations as well. The extension will try to connect to an external server started with "dlv dap --listen=:" to ask it to launch/attach to the target process.
(Default: `2345`)
| | `processId` |
_n/a_
|

Option 1: Use process picker to select a process to attach, or Process ID as integer.

Allowed Values: `"${command:pickProcess}"`, `"${command:pickGoProcess}"`

Option 2: Attach to a process by name. If more than one process matches the name, use the process picker to select a process.

Option 3: The numeric ID of the process to be debugged. If 0, use the process picker to select a process.

(Default: `0`)
| -| `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.
(Default: `"${workspaceFolder}"`)
|

_n/a_
| +| `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 interprets it as a workspace relative path.
(Default: `"${workspaceFolder}"`)
|
_n/a_
| | `remotePath` |
_n/a_
| (Deprecated) *Use `substitutePath` instead.*
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. Not supported with `dlv-dap`.
(Default: `""`)
| | `showGlobalVariables` | Boolean value to indicate whether global package variables should be shown in the variables pane or not.
(Default: `false`)
|
_same as Launch_
| | `showLog` | Show log output from the delve debugger. Maps to dlv's `--log` flag.
(Default: `false`)
|
_same as Launch_
| | `showRegisters` | Boolean value to indicate whether register variables should be shown in the variables pane or not.
(Default: `false`)
|
_same as Launch_
| | `stackTraceDepth` | Maximum depth of stack trace collected from Delve.
(Default: `50`)
|
_same as Launch_
| | `stopOnEntry` | Automatically stop program after launch.
(Default: `false`)
| Automatically stop program after attach.
(Default: `false`)
| -| `substitutePath` | An array of mappings from a local path (editor) to the remote path (debugee). This setting is useful when working in a file system with symbolic links, running remote debugging, or debugging an executable compiled externally. The debug adapter will replace the local path with the remote path in all of the calls.


  • `"from"`: The absolute local path to be replaced when passing paths to the debugger.
    (Default: `""`)
  • `"to"`: The absolute remote path to be replaced when passing paths back to the client.
    (Default: `""`)

| An array of mappings from a local path (editor) to the remote path (debugee). This setting is useful when working in a file system with symbolic links, running remote debugging, or debugging an executable compiled externally. The debug adapter will replace the local path with the remote path in all of the calls. Overriden by `remotePath`.


  • `"from"`: The absolute local path to be replaced when passing paths to the debugger.
    (Default: `""`)
  • `"to"`: The absolute remote path to be replaced when passing paths back to the client.
    (Default: `""`)

| +| `substitutePath` | An array of mappings from a local path (editor) to the remote path (debugee). This setting is useful when working in a file system with symbolic links, running remote debugging, or debugging an executable compiled externally. The debug adapter will replace the local path with the remote path in all of the calls.


  • `"from"`: The absolute local path to be replaced when passing paths to the debugger.
    (Default: `""`)
  • `"to"`: The absolute remote path to be replaced when passing paths back to the client.
    (Default: `""`)

| An array of mappings from a local path (editor) to the remote path (debugee). This setting is useful when working in a file system with symbolic links, running remote debugging, or debugging an executable compiled externally. The debug adapter will replace the local path with the remote path in all of the calls. Overridden by `remotePath`.


  • `"from"`: The absolute local path to be replaced when passing paths to the debugger.
    (Default: `""`)
  • `"to"`: The absolute remote path to be replaced when passing paths back to the client.
    (Default: `""`)

| | `trace` | Various levels of logging shown in the debug console & 'Go Debug' output channel. When using the `legacy` debug adapter, the logs will also be written to a file if it is set to a value other than `error`.

Allowed Values: `"verbose"`, `"trace"`, `"log"`, `"info"`, `"warn"`, `"error"`
(Default: `"error"`)
|

_same as Launch_
| | `traceDirPath` | Directory in which the record trace is located or to be created for a new output trace. For use on 'replay' mode only
(Default: `""`)
|
_n/a_
| diff --git a/docs/features.md b/docs/features.md index b58532626f..953ac4bd1f 100644 --- a/docs/features.md +++ b/docs/features.md @@ -212,10 +212,10 @@ The extension organizes imports automatically and can add missing imports if the #### Custom formatter -In addition to the default [`go fmt`](https://pkg.go.dev/cmd/gofmt) style formatter, the language server (`gopls`) supports `github.com/mvdan/gofumpt` style formmating. Use gopls's [`formatting.gofumpt`](settings.md#formattinggofumpt) setting: +In addition to the default [`go fmt`](https://pkg.go.dev/cmd/gofmt) style formatter, the language server (`gopls`) supports `github.com/mvdan/gofumpt` style formatting. Use gopls's [`formatting.gofumpt`](settings.md#formattinggofumpt) setting: ```json -"gopls": { "fomatting.gofumpt": true } +"gopls": { "formatting.gofumpt": true } ``` You can also configure to use other custom formatter (`golines`) by using the `"go.formatTool"` setting. The custom formatter must operate on file contents from STDIN, and output the formatted result to STDOUT. diff --git a/docs/settings.md b/docs/settings.md index 823291b740..65eaa1915e 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -19,7 +19,7 @@ To view the list of settings: ## Security -This extension runs a few [third-party command-line tools](tools.md) found from the locations determined by the `PATH` or `Path` environment variable, and the settings such as `"go.alternateTools"` or `"go.toolsGopath"`. Configuring them in workspace settings allows users to conveniently select a different set of tools based on project's need, but also allows attackers to run arbitrary binaries on your machine if they successfuly convince you to open a random repository. In order to reduce the security risk, the extension reads those settings from user settings by default. If the repository can be trusted and workspace settings must be used, you can mark the workspace as a trusted workspace using the `"Go: Toggle Workspace Trust Flag"` command. +This extension runs a few [third-party command-line tools](tools.md) found from the locations determined by the `PATH` or `Path` environment variable, and the settings such as `"go.alternateTools"` or `"go.toolsGopath"`. Configuring them in workspace settings allows users to conveniently select a different set of tools based on project's need, but also allows attackers to run arbitrary binaries on your machine if they successfully convince you to open a random repository. In order to reduce the security risk, the extension reads those settings from user settings by default. If the repository can be trusted and workspace settings must be used, you can mark the workspace as a trusted workspace using the `"Go: Toggle Workspace Trust Flag"` command. ## Detailed list @@ -146,7 +146,7 @@ Delve settings that applies to all debugging sessions. Debug configuration in th | `showGlobalVariables` | Boolean value to indicate whether global package variables should be shown in the variables pane or not.
Default: `false` | | `showLog` | Show log output from the delve debugger. Maps to dlv's `--log` flag.
Default: `false` | | `showRegisters` | Boolean value to indicate whether register variables should be shown in the variables pane or not.
Default: `false` | -| `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). | +| `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. Overridden by `remotePath` (in attach request). | ### `go.diagnostic.vulncheck` (Experimental) vulncheck enables vulnerability scanning. diff --git a/extension/package.json b/extension/package.json index 7d89ee1207..f9e0e92870 100644 --- a/extension/package.json +++ b/extension/package.json @@ -622,7 +622,7 @@ }, "program": { "type": "string", - "description": "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.", + "description": "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 interprets it as a workspace relative path.", "default": "${workspaceFolder}" }, "mode": { @@ -961,7 +961,7 @@ } } }, - "description": "An array of mappings from a local path (editor) to the remote path (debugee). This setting is useful when working in a file system with symbolic links, running remote debugging, or debugging an executable compiled externally. The debug adapter will replace the local path with the remote path in all of the calls. Overriden by `remotePath`.", + "description": "An array of mappings from a local path (editor) to the remote path (debugee). This setting is useful when working in a file system with symbolic links, running remote debugging, or debugging an executable compiled externally. The debug adapter will replace the local path with the remote path in all of the calls. Overridden by `remotePath`.", "default": [] }, "trace": { @@ -1898,7 +1898,7 @@ } } }, - "description": "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).", + "description": "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. Overridden by `remotePath` (in attach request).", "default": [] } },