-
Notifications
You must be signed in to change notification settings - Fork 729
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
debug: allow debugAdapter=dlv-dap with remote attach mode #1873
Conversation
This PR (HEAD: 4a6ced4) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/vscode-go/+/360974 to see it. Tip: You can toggle comments from me using the |
Message from Hyang-Ah Hana Kim: Patch Set 2: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/360974. |
Message from Polina Sokolova: Patch Set 3: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/360974. |
This PR (HEAD: 3a0ce53) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/vscode-go/+/360974 to see it. Tip: You can toggle comments from me using the |
Message from Hyang-Ah Hana Kim: Patch Set 6: Run-TryBot+1 Code-Review+2 Trust+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/360974. |
Message from kokoro: Patch Set 6: Kokoro presubmit build starting for golang/vscode-go/gcp_ubuntu/presubmit Please don’t reply on this GitHub thread. Visit golang.org/cl/360974. |
Message from kokoro: Patch Set 6: TryBot-Result+1 Kokoro presubmit build finished with status: SUCCESS Please don’t reply on this GitHub thread. Visit golang.org/cl/360974. |
If debug adapter is not specified, still default to `legacy` for remote attach in case users haven't updated their tools to newer version of dlv that supports this via DAP. We can flip the default in a couple of months. In the meantime, users will need to specify directly if they want to use `dlv-dap` adapter. There is no good way to detect the version of a running server, so we will always allow them to proceed, while providing a warning about the right version at session start-up and at shutdown via Go Debug output channel if we detect that the connection failed with no responses. After this change, we will have the following behavior: attach + remote + debugAdapter= => legacy attach + remote + debugAdapter=dlv-dap => dlv-dap + version warnings attach + remote + debugAdapter=legacy => legacy attach + !remote + debugAdapter=dlv-dap + port => warning to drop port if not using external server launch + !remote + debugAdapter=dlv-dap + port => warning to drop port if not using external server launch + remote + debugAdapter=dlv-dap + port => error from dlv server Updates #1861 Change-Id: Ia2e6b35f9d401ea2e719a65c78d9cf8e5ef90c24 GitHub-Last-Rev: 3a0ce53 GitHub-Pull-Request: #1873 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/360974 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com> Reviewed-by: Polina Sokolova <polina@google.com> Trust: Hyang-Ah Hana Kim <hyangah@gmail.com> Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: kokoro <noreply+kokoro@google.com>
This PR is being closed because golang.org/cl/360974 has been merged. |
If debug adapter is not specified, still default to
legacy
for remote attach in case users haven't updated their tools to newer version of dlv that supports this via DAP. We can flip the default in a couple of months. In the meantime, users will need to specify directly if they want to usedlv-dap
adapter. There is no good way to detect the version of a running server, so we will always allow them to proceed, while providing a warning about the right version at session start-up and at shutdown via Go Debug output channel if we detect that the connection failed with no responses.After this change, we will have the following behavior:
attach + remote + debugAdapter= => legacy
attach + remote + debugAdapter=dlv-dap => dlv-dap + version warnings
attach + remote + debugAdapter=legacy => legacy
attach + !remote + debugAdapter=dlv-dap + port => warning to drop port if not using external server
launch + !remote + debugAdapter=dlv-dap + port => warning to drop port if not using external server
launch + remote + debugAdapter=dlv-dap + port => error from dlv server
Updates #1861