diff --git a/gopls/doc/commands.md b/gopls/doc/commands.md index dbbc4b50ac..4c44f42559 100644 --- a/gopls/doc/commands.md +++ b/gopls/doc/commands.md @@ -218,10 +218,11 @@ Args: } ``` -### **Start the gopls debug server if it isn't running, and** +### **Start the gopls debug server** Identifier: `gopls.start_debugging` -return the debug address. +Start the gopls debug server if it isn't running, and return the debug +address. Args: diff --git a/internal/lsp/command/interface.go b/internal/lsp/command/interface.go index 03e40a8d9f..360dfc3492 100644 --- a/internal/lsp/command/interface.go +++ b/internal/lsp/command/interface.go @@ -132,8 +132,10 @@ type Interface interface { // Query the server for information about active workspaces. WorkspaceMetadata(context.Context) (WorkspaceMetadataResult, error) - // StartDebugging: Start the gopls debug server if it isn't running, and - // return the debug address. + // StartDebugging: Start the gopls debug server + // + // Start the gopls debug server if it isn't running, and return the debug + // address. StartDebugging(context.Context, DebuggingArgs) (DebuggingResult, error) } diff --git a/internal/lsp/source/api_json.go b/internal/lsp/source/api_json.go index f87aadc0de..a30111f7e1 100755 --- a/internal/lsp/source/api_json.go +++ b/internal/lsp/source/api_json.go @@ -816,8 +816,8 @@ var GeneratedAPIJSON = &APIJSON{ }, { Command: "gopls.start_debugging", - Title: "Start the gopls debug server if it isn't running, and", - Doc: "return the debug address.", + Title: "Start the gopls debug server", + Doc: "Start the gopls debug server if it isn't running, and return the debug\naddress.", ArgDoc: "{\n\t// Optional: the address (including port) for the debug server to listen on.\n\t// If not provided, the debug server will bind to \"localhost:0\", and the\n\t// full debug URL will be contained in the result.\n\t// \n\t// If there is more than one gopls instance along the serving path (i.e. you\n\t// are using a daemon), each gopls instance will attempt to start debugging.\n\t// If Addr specifies a port, only the daemon will be able to bind to that\n\t// port, and each intermediate gopls instance will fail to start debugging.\n\t// For this reason it is recommended not to specify a port (or equivalently,\n\t// to specify \":0\").\n\t// \n\t// If the server was already debugging this field has no effect, and the\n\t// result will contain the previously configured debug URL(s).\n\t\"Addr\": string,\n}", ResultDoc: "{\n\t// The URLs to use to access the debug servers, for all gopls instances in\n\t// the serving path. For the common case of a single gopls instance (i.e. no\n\t// daemon), this will be exactly one address.\n\t// \n\t// In the case of one or more gopls instances forwarding the LSP to a daemon,\n\t// URLs will contain debug addresses for each server in the serving path, in\n\t// serving order. The daemon debug address will be the last entry in the\n\t// slice. If any intermediate gopls instance fails to start debugging, no\n\t// error will be returned but the debug URL for that server in the URLs slice\n\t// will be empty.\n\t\"URLs\": []string,\n}", },