go/internal/lsp/command
Rob Findley 7c93484b9a internal/lsp: add a command to start the debug server
The utility of the debug server is limited by the requirement to start
gopls with the `-debug` flag and then look in the logs to see which port
the debug server is bound to.

This CL adds a new custom command `gopls.startDebugging` to start the
debug server on demand if it isn't already running, and return its debug
address. It also does some gymnastics to make this turn on debugging for
any intermediate gopls forwarders, when using daemon mode.

For golang/go#45518

Change-Id: I48a90088f96aca54f34f93bedbfe864515320f61
Reviewed-on: https://go-review.googlesource.com/c/tools/+/309409
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2021-04-26 15:43:18 +00:00
..
commandmeta internal/lsp/command: pass Context to commands 2021-02-09 23:13:16 +00:00
gen all: fmt tests with new gofmt 2021-02-20 03:28:42 +00:00
command_gen.go internal/lsp: add a command to start the debug server 2021-04-26 15:43:18 +00:00
generate.go all: fmt tests with new gofmt 2021-02-20 03:28:42 +00:00
interface.go internal/lsp: add a command to start the debug server 2021-04-26 15:43:18 +00:00
interface_test.go internal/lsp/command: rename package generate to gen 2021-02-17 22:11:19 +00:00
util.go internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00