You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
What version of Go, VS Code & VS Code Go extension are you using?
Run go version to get version of Go
go version go1.14.1 darwin/amd64
Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders
Version: 1.43.2
Check your installed extensions to get the version of the VS Code Go extension
0.13.1
Run go env GOOS GOARCH to get the operating system and processor architecture details
darwin
amd64
Describe the bug
When pausing the program with no breakpoints set with Pause F6, I see the UI say "paused on breakpoint" some of the times. I expect to see "paused on pause".
Steps to reproduce the behavior:
Use a simple program like this:
func main() {
time.Sleep(10 * time.Second)
}
Set no breakpoints.
Launch with stop-on-entry enabled.
Once the program stops on entry, hit Continue (F5), then click Pause (F6).
The Call Stack will show the first thread as "paused on breakpoint" or "paused on pause", depending on the internal timing, so you might have to try this more than once to observe the behavior.
When continue request is served, an async continue rpc is issued:
2020-04-07T12:14:54-07:00 debug layer=rpc (async 6) <- RPCServer.Command(api.DebuggerCommand{"name":"continue","ReturnInfoLoadConfig":null})
When pause request is served, an async halt rpc is issued:
2020-04-07T12:14:55-07:00 debug layer=rpc (async 7) <- RPCServer.Command(api.DebuggerCommand{"name":"halt","ReturnInfoLoadConfig":null})
Both Pause and Continue callbacks get called - see "pause state" and "continue state" logging lines above.
[19:14:55.512 UTC] pause state {"Running":false,"currentThread":{"id":15757782,"pc":140735314958218,"file":"","line":0,"goroutineID":0,"ReturnValues":null},"Threads":[{"id":15757817,"pc":140735314946150,"file":"","line":0,"goroutineID":0,"ReturnValues":null},{"id":15757818,"pc":140735314946150,"file":"","line":0,"goroutineID":0,"ReturnValues":null},{"id":15757819,"pc":140735314946150,"file":"","line":0,"goroutineID":0,"ReturnValues":null},{"id":15757782,"pc":140735314958218,"file":"","line":0,"goroutineID":0,"ReturnValues":null},{"id":15757816,"pc":140735314946150,"file":"","line":0,"goroutineID":0,"ReturnValues":null}],"NextInProgress":false,"exited":false,"exitStatus":0,"When":""}
[19:14:55.512 UTC] continue state {"Running":false,"currentThread":{"id":15757782,"pc":140735314958218,"file":"","line":0,"goroutineID":0,"ReturnValues":null},"Threads":[{"id":15757782,"pc":140735314958218,"file":"","line":0,"goroutineID":0,"ReturnValues":null},{"id":15757816,"pc":140735314946150,"file":"","line":0,"goroutineID":0,"ReturnValues":null},{"id":15757817,"pc":140735314946150,"file":"","line":0,"goroutineID":0,"ReturnValues":null},{"id":15757818,"pc":140735314946150,"file":"","line":0,"goroutineID":0,"ReturnValues":null},{"id":15757819,"pc":140735314946150,"file":"","line":0,"goroutineID":0,"ReturnValues":null}],"NextInProgress":false,"exited":false,"exitStatus":0,"When":""}
Each of those callbacks calls handleReenterDebug, pauseRequest - with "pause" reason and continue one with "breakpoint" reason. These two callbacks compete to issue stopped events. Whoever gets to send a stopped event last, is the one that gets displayed in the UI. Then in response to both events and some thread events as well (which will now be removed with #3145), a number of duplicate threads, stacktrace, etc, requests is called, all returning the same results. All of this activity for just one pause.
The text was updated successfully, but these errors were encountered:
For background, the handling for pause requests was introduced in #2126.
polinasok
changed the title
"Pause on breakpoint" is shown when pausing with "Pause (F6)"
debug: "Pause on breakpoint" is shown when pausing with "Pause (F6)"
Apr 7, 2020
What version of Go, VS Code & VS Code Go extension are you using?
go version
to get version of Gocode -v
orcode-insiders -v
to get version of VS Code or VS Code Insidersgo env GOOS GOARCH
to get the operating system and processor architecture detailsDescribe the bug
When pausing the program with no breakpoints set with Pause F6, I see the UI say "paused on breakpoint" some of the times. I expect to see "paused on pause".
Steps to reproduce the behavior:
Screenshots or recordings
This is what I am observing:
This is what expect:
Looking in the log I see the following:
When continue request is served, an async continue rpc is issued:
When halt returns, so does continue.
Both Pause and Continue callbacks get called - see "pause state" and "continue state" logging lines above.
Each of those callbacks calls handleReenterDebug, pauseRequest - with "pause" reason and continue one with "breakpoint" reason. These two callbacks compete to issue stopped events. Whoever gets to send a stopped event last, is the one that gets displayed in the UI. Then in response to both events and some thread events as well (which will now be removed with #3145), a number of duplicate threads, stacktrace, etc, requests is called, all returning the same results. All of this activity for just one pause.
The text was updated successfully, but these errors were encountered: