pkg/terminal: print breakpoint number on stop (#3675)
This commit is contained in:
parent
29aa2ea8c9
commit
d688d4c83b
@ -2777,6 +2777,8 @@ func printcontextThread(t *Term, th *api.Thread) {
|
||||
bpname = fmt.Sprintf("watchpoint on [%s] ", th.Breakpoint.WatchExpr)
|
||||
} else if th.Breakpoint.Name != "" {
|
||||
bpname = fmt.Sprintf("[%s] ", th.Breakpoint.Name)
|
||||
} else if !th.Breakpoint.Tracepoint {
|
||||
bpname = fmt.Sprintf("[Breakpoint %d] ", th.Breakpoint.ID)
|
||||
}
|
||||
|
||||
if th.Breakpoint.Tracepoint || th.Breakpoint.TraceReturn {
|
||||
|
@ -1366,7 +1366,7 @@ func TestTranscript(t *testing.T) {
|
||||
withTestTerminal("math", t, func(term *FakeTerminal) {
|
||||
term.MustExec("break main.main")
|
||||
out := term.MustExec("continue")
|
||||
if !strings.HasPrefix(out, "> main.main()") {
|
||||
if !strings.HasPrefix(out, "> [Breakpoint 1] main.main()") {
|
||||
t.Fatalf("Wrong output for next: <%s>", out)
|
||||
}
|
||||
fh, err := os.CreateTemp("", "test-transcript-*")
|
||||
|
Loading…
Reference in New Issue
Block a user