Finding the breakpoint in Visual Studio Code #2912
Replies: 3 comments
-
cc @polinasok @suzmue but I think this is probably a vscode thing |
Beta Was this translation helpful? Give feedback.
-
The goroutine with the breakpoint should be automatically selected by VSCode, but I have found that it can still be difficult to find in long lists of goroutines. There are a couple of ways that you can more easily find the goroutine with the breakpoint. The selected goroutine is marked with an asterisk, to make it visually different and it will have Another suggestion I have to make it easier to find the goroutines is to use the |
Beta Was this translation helpful? Give feedback.
-
To expand on what @suzmue noted: the goroutines are returned in a specific order. The current goroutine is expanded in-place when paused on a breakpoint, so you need to scroll down the list to find it. And if this is not the first breakpoint/pause, there might be multiple goroutines expanded at the same time, unless you reset the view with the goroutine filters. To filter as you go, you can use
or
More on possible filters at https://github.com/go-delve/delve/blob/master/Documentation/cli/README.md#goroutines
|
Beta Was this translation helpful? Give feedback.
-
When I hit a breakpoint, its often a chore to find the right call stack in the debugger list of goroutines. Ideally the breakpoint goroutine and stack would be selected by default.
I don't know if this a Delve thing, a Gopls thing, a Visual Studio Code thing, or a I don't know what I'm doing thing. Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions