-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/tools/gopls: show message with link to debug server with -debug=:0 #37215
Comments
FWIW I opted for this when using a shared gopls daemon (#34111): -debug is enabled on the daemon by default (though some users have already asked to be able to disable it, so I'll support that as well). I also used an extra |
The gopls process often runs on a local environment, and people that use multi user systems will probably not be aware of the fact that "anyone" on that machine can connect to their gopls instance. The main concern is that the contents of the file being edited is available directly and that makes it trivial to grab information. |
@heschik made the point that turning on I am not sure about turning on the debug server by default because of the concerns that @leitzler mentioned, but maybe we can start with a flag that makes it a bit easier to enable and then go from there. |
@stamblerre what would an easier flag look like? One of the nice things about daemon mode is that it was easy to hook up some debugging over jsonrpc2 without a debug server (https://golang.org/cl/222669). I wonder if we could do the same for sidecar serving (i.e., add a debugHandler to the jsonrpc2 handler stack and add functionality to the vscode client to inspect debug information). Pie in the sky: If we standardized a jsonrpc2 protocol (meta-protocol?) for debug information, we could even turn the current debug webserver into a separate jsonrpc2 client process that can be attached even after the gopls server is started... Don't want to derail this discussion though! My opinion is that the current state, while suboptimal, is better than enabling |
That's fair. I was thinking something like |
Not sure about coupling |
FYI - in vscode-go, we have client-side tracing that can be enabled/disabled anytime without restarting the gopls. So for vscode-go, |
currently we ask users to supply flags such as
-port
and-rpc.trace
and restart gopls when debugging is needed. Please consider turning on the debug port by default and make some traces available.The text was updated successfully, but these errors were encountered: