-
Notifications
You must be signed in to change notification settings - Fork 756
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
During debugging jumps to proc.go at each step. #1617
Comments
Rolled back to May 2021 (version 1.57) release and no issue with debugging. VS Code is not jumping to |
I have this same issue. |
Thanks for reporting the issue @mjgabriel and @lucky-wolf The new VS Code release (1.58) probably has some changes that are picky and unhappy about how Go's legacy debug adapter behaves. I see VS Code issues multiple StackTraceRequests back to back but I don't know why yet. (cc @suzmue @polinasok - do you know what triggers vscode's stack trace requests?)
|
VS Code automatically expands the first 'stopped' thread. DAP assumes that a single thread can be stepped, so the UI does not know that the second goroutine also continued. It therefore tries to expand it once thread 1 resumes via next. However, because the next executes so quickly it finishes expanding it after thread 1 has already stopped. In |
I can confirm that the new dlv-dap works for me and resolves this issue. |
The fix for this problem doesn't see too hard but we are afraid this would surface other issues in the legacy debug adapter. |
Switched to using |
When I changed
|
@kosmgco Please also let us know what you get wiith
What do you expect to see? |
|
Apologies if this not a great way to communicate this (and please point me in a better direction): The dlv-dap does work well except when adding a BP while a debug session is active. If I do this - then the underlying software locks up and the debugger session is useless and all I can do is to kill it with the "stop" button on the debug context toolbar. Anything else is useless. Doesn't matter if I was in step mode or run mode - simply setting a BP clobbers the dlv-dap context (it would seem). Worth improving on for sure (or marking the new BP as disabled until the current session ends and I can fire up a new one -- that would be a fine work-around for now -- essentially - delaying trying to send it to delv until a new session). |
@lucky-wolf That sounds like a real problem and I can understand that this would make using dlv-dap difficult. The behavior of dlv-dap vs the legacy adapter when it comes to setting a breakpoint while the debuggee is running is slig ohtly different. In the old adapter, it would attempt to halt, set breakpoint, and continue. In dlv-dap, it just halts and sets the breakpoint. There were several bugs associated with the old adapter having to doing with attempting to continue, so we decided not to implement continuing after setting breakpoints. Could you please open a new issue and include the steps that you take to produce this and include the logs from To include the logs please add the following to your launch configuration:
Then you can copy the output from the debug console and from the |
@kosmgco Can you check if you have the same issue after updating |
Send the continued event before the step response to make sure that there is no time where the client believes that only a single thread is running. Updates golang/vscode-go#1617
Reporting back that using I'm running |
* service/dap: send continued event before step response Send the continued event before the step response to make sure that there is no time where the client believes that only a single thread is running. Updates golang/vscode-go#1617 * move to helper
@mjgabriel could you please use `Go: install/update tools" to get a fresher version of dlv-dap and try again. We just merged in a fix that might help. Thank you. |
Excellent, will do. Thank you. 👍🏼 |
Change https://golang.org/cl/338194 mentions this issue: |
What version of Go, VS Code & VS Code Go extension are you using?
go version
to get version of Go from the VS Code integrated terminal.go 1.16.5 darwin/amd64
gopls -v version
to get version of Gopls from the VS Code integrated terminal.golang.org/x/tools/gopls v0.7.0
golang.org/x/tools/gopls@v0.7.0 h1:JQBHW81Gsyim6iDjUwGoPeSpXrSqwen3isPJLfDfaYU=
code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.1.58.0
2d23c42a936db1c7b3b06f918cde29561cc47cd6
x64
v0.26.0
Go: Locate Configured Go Tools
command.Share the Go related settings you have added/edited
Describe the bug
When debugging VS Code jumps to
proc.go
on every step. This started after updating VS Code to June 2021 (version 1.58).Steps to reproduce the behavior:
Load up a project, starting debugging.
The text was updated successfully, but these errors were encountered: