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 {
|
if s.stopOnEntry {
|
||||||
e := &dap.StoppedEvent{
|
e := &dap.StoppedEvent{
|
||||||
Event: *newEvent("stopped"),
|
Event: *newEvent("stopped"),
|
||||||
Body: dap.StoppedEventBody{Reason: "breakpoint", ThreadId: 1, AllThreadsStopped: true},
|
Body: dap.StoppedEventBody{Reason: "entry", ThreadId: 1, AllThreadsStopped: true},
|
||||||
}
|
}
|
||||||
s.send(e)
|
s.send(e)
|
||||||
}
|
}
|
||||||
|
@ -135,10 +135,10 @@ func TestStopOnEntry(t *testing.T) {
|
|||||||
client.ConfigurationDoneRequest()
|
client.ConfigurationDoneRequest()
|
||||||
stopEvent := client.ExpectStoppedEvent(t)
|
stopEvent := client.ExpectStoppedEvent(t)
|
||||||
if stopEvent.Seq != 0 ||
|
if stopEvent.Seq != 0 ||
|
||||||
stopEvent.Body.Reason != "breakpoint" ||
|
stopEvent.Body.Reason != "entry" ||
|
||||||
stopEvent.Body.ThreadId != 1 ||
|
stopEvent.Body.ThreadId != 1 ||
|
||||||
!stopEvent.Body.AllThreadsStopped {
|
!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)
|
cdResp := client.ExpectConfigurationDoneResponse(t)
|
||||||
if cdResp.Seq != 0 || cdResp.RequestSeq != 5 {
|
if cdResp.Seq != 0 || cdResp.RequestSeq != 5 {
|
||||||
|
Loading…
Reference in New Issue
Block a user