service/dap: Change reason to "entry" when stopping on entry (#1976)
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
This commit is contained in:
parent
3cf685e5ea
commit
c97c04220d
@ -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)
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user