-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
service,terminal,cmd/dlv: automatically guessing substitute-path config #3781
base: master
Are you sure you want to change the base?
Conversation
15b7904
to
d41a9b9
Compare
cc @hyangah I've been wanting to remove the legacy mode of vscode-go adapter and I was wondering if something like this would work. How it worksClient side it runs What the extension would have to doThe extension, before connecting to dlv, would have to run locally Thoughts? Would this work? |
Thank you so much! A couple of questions:
In case of the remote debugging, the debugged target executable is available only on the remote host. Shouldn't
|
The idea is that
The idea is that
I initially did this and then backed off of it. There is no guarantee that the standard library that was used to build the executable is the same one that's available locally, so we shouldn't blindly map it. We could be smarter about it, but in practice it is rare that the user will step into the standard library (I think) so it's probably fine to leave it unmapped. |
Thanks. I will give it a try and test it.
I'd say there is also no guarantee that the user code used to build the executable is not exactly the same as the one available locally strictly speaking. I hope users of remote debugging to ensure both systems use the identical versions. (Or can we have a warning based on the Go build info?) |
Yes, we have a warning for this. Vscode-go doesn't but that's a UI problem.
Sure, let us know. |
I think we need to handle stdlib locations unfortunately.
I agree that it's not perfect if local/remote go versions don't match. We can track this issue - how to notify users of this version skew - separately, independent of this PR. There is one more issue. In the specific example I tested (https://github.com/hyangah/go-docker-alpine-remote-debug), the main package is
I will send the copy of the binary built in case it's helpful for investigation. |
d41a9b9
to
94e462d
Compare
Add command, API calls and launch.json option to automatically guess substitute-path configuration.
94e462d
to
5829ae6
Compare
Added the GOROOT mapping and fixed the example. The example did not work because there the main module contains a single package (main). |
Add command, API calls and launch.json option to automatically guess
substitute-path configuration.