未验证 提交 c97c0422 编写于 作者: P polinasok 提交者: GitHub

service/dap: Change reason to "entry" when stopping on entry (#1976)

Co-authored-by: NPolina Sokolova <polinasok@users.noreply.github.com>
上级 3cf685e5
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册