mirror of
https://github.com/go-delve/delve.git
synced 2025-11-02 21:40:22 +08:00
service/dap: move presentationHint to frame from source (#2810)
This commit is contained in:
@ -1991,7 +1991,7 @@ func (s *Session) onStackTraceRequest(request *dap.StackTraceRequest) {
|
||||
|
||||
packageName := fnPackageName(loc)
|
||||
if !isSystemGoroutine && packageName == "runtime" {
|
||||
stackFrame.Source.PresentationHint = "deemphasize"
|
||||
stackFrame.PresentationHint = "subtle"
|
||||
}
|
||||
stackFrames = append(stackFrames, stackFrame)
|
||||
}
|
||||
|
||||
@ -4786,8 +4786,8 @@ func TestPanicBreakpointOnContinue(t *testing.T) {
|
||||
st := client.ExpectStackTraceResponse(t)
|
||||
for i, frame := range st.Body.StackFrames {
|
||||
if strings.HasPrefix(frame.Name, "runtime.") {
|
||||
if frame.Source.PresentationHint != "deemphasize" {
|
||||
t.Errorf("\ngot Body.StackFrames[%d]=%#v\nwant Source.PresentationHint=\"deemphasize\"", i, frame)
|
||||
if frame.PresentationHint != "subtle" {
|
||||
t.Errorf("\ngot Body.StackFrames[%d]=%#v\nwant Source.PresentationHint=\"subtle\"", i, frame)
|
||||
}
|
||||
} else if frame.Source.PresentationHint != "" {
|
||||
t.Errorf("\ngot Body.StackFrames[%d]=%#v\nwant Source.PresentationHint=\"\"", i, frame)
|
||||
|
||||
Reference in New Issue
Block a user