Skip to content
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: changing to a different goroutine and executing Step Over goes back to the previous goroutine #118

Closed
ramya-rao-a opened this issue May 28, 2020 · 4 comments
Assignees
Labels
Debug Issues related to the debugging functionality of the extension. FrozenDueToAge
Milestone

Comments

@ramya-rao-a
Copy link
Contributor

From microsoft/vscode-go#2560 by @aarzilli:

  1. Debug https://github.com/aarzilli/delve_client_testing/blob/master/08gswitch/main.go
  2. Click on one of the paused goroutines executing main.coroutine in the left column
  3. Click Step Over

Expected:

Cursor moves to the next line on the goroutine I'm currently watching.

What actually happend

Debuggers switches back to the goroutine it was originally stopped at and moves to the next line.

@stamblerre stamblerre changed the title Changing to a different goroutine and executing Step Over goes back to the previous goroutine debug: changing to a different goroutine and executing Step Over goes back to the previous goroutine Jun 3, 2020
@stamblerre stamblerre added NeedsFix The path to resolution is known, but the work has not been done. Debug Issues related to the debugging functionality of the extension. labels Jun 3, 2020
@polinasok
Copy link
Contributor

@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/300769 mentions this issue: src/debugAdapter: change to correct goroutine when stepping

gopherbot pushed a commit that referenced this issue Mar 26, 2021
…epping

The debugger needs to switch to the correct goroutine if the threadId
in the request does not match the current goroutine. This change
checks the current state to decide if it should switch goroutines,
and then does so. This adds a test for 'next' and 'step in'
requests that switch goroutines.

Updates #118

Change-Id: I553ebbed6de1001e0e7da756278fcc717884f946
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/300769
Trust: Suzy Mueller <suzmue@golang.org>
Run-TryBot: Suzy Mueller <suzmue@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
@suzmue suzmue added this to the v0.24.0 milestone Mar 31, 2021
@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/306989 mentions this issue: test/integration/goDebug.test.ts: enable switch goroutine test dap

gopherbot pushed a commit that referenced this issue Apr 2, 2021
The switch goroutine feature has now been merged into dlv dap
so the behavior can be included in the extension tests.

Updates #118

Change-Id: I1258eae502abcd7665887f5a225407e0fd1bd2a6
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/306989
Trust: Suzy Mueller <suzmue@golang.org>
Run-TryBot: Suzy Mueller <suzmue@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
@suzmue suzmue closed this as completed Apr 6, 2021
@polinasok
Copy link
Contributor

Was about to close this, but you beat me to it! Thank you for making the change @suzmue! Just tried it for myself - works great!

@polinasok polinasok removed the NeedsFix The path to resolution is known, but the work has not been done. label Apr 6, 2021
@golang golang locked and limited conversation to collaborators Apr 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Debug Issues related to the debugging functionality of the extension. FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

5 participants