diff --git a/service/dap/server.go b/service/dap/server.go index 78646d26878410b4fc3d7cec31c5dd8f86ed8349..a7262a8e858f77573562a32e1969ed82c1821b87 100644 --- a/service/dap/server.go +++ b/service/dap/server.go @@ -438,7 +438,7 @@ func (s *Server) onConfigurationDoneRequest(request *dap.ConfigurationDoneReques if s.stopOnEntry { e := &dap.StoppedEvent{ Event: *newEvent("stopped"), - Body: dap.StoppedEventBody{Reason: "breakpoint", ThreadId: 1, AllThreadsStopped: true}, + Body: dap.StoppedEventBody{Reason: "entry", ThreadId: 1, AllThreadsStopped: true}, } s.send(e) } diff --git a/service/dap/server_test.go b/service/dap/server_test.go index a462ed9581b11e44c88e9656483a739655235cc9..b86705ba8af82764030c95909521b51050729316 100644 --- a/service/dap/server_test.go +++ b/service/dap/server_test.go @@ -135,10 +135,10 @@ func TestStopOnEntry(t *testing.T) { client.ConfigurationDoneRequest() stopEvent := client.ExpectStoppedEvent(t) if stopEvent.Seq != 0 || - stopEvent.Body.Reason != "breakpoint" || + stopEvent.Body.Reason != "entry" || stopEvent.Body.ThreadId != 1 || !stopEvent.Body.AllThreadsStopped { - t.Errorf("\ngot %#v\nwant Seq=0, Body={Reason=\"breakpoint\", ThreadId=1, AllThreadsStopped=true}", stopEvent) + t.Errorf("\ngot %#v\nwant Seq=0, Body={Reason=\"entry\", ThreadId=1, AllThreadsStopped=true}", stopEvent) } cdResp := client.ExpectConfigurationDoneResponse(t) if cdResp.Seq != 0 || cdResp.RequestSeq != 5 {