diff --git a/pkg/terminal/command.go b/pkg/terminal/command.go index 4e9bd340..2736e469 100644 --- a/pkg/terminal/command.go +++ b/pkg/terminal/command.go @@ -1412,7 +1412,9 @@ func (c *Commands) cont(t *Term, ctx callContext, args string) error { if args != "" { tmp, err := setBreakpoint(t, ctx, false, args) if err != nil { - return err + if !strings.Contains(err.Error(), "Breakpoint exists") { + return err + } } defer func() { for _, bp := range tmp { diff --git a/pkg/terminal/command_test.go b/pkg/terminal/command_test.go index 4cd90eb9..a80b6203 100644 --- a/pkg/terminal/command_test.go +++ b/pkg/terminal/command_test.go @@ -1130,6 +1130,18 @@ func TestContinueUntil(t *testing.T) { }) } +func TestContinueUntilExistingBreakpoint(t *testing.T) { + withTestTerminal("continuetestprog", t, func(term *FakeTerminal) { + term.MustExec("break main.main") + if runtime.GOARCH != "386" { + listIsAt(t, term, "continue main.main", 16, -1, -1) + } else { + listIsAt(t, term, "continue main.main", 17, -1, -1) + } + listIsAt(t, term, "continue main.sayhi", 12, -1, -1) + }) +} + func TestPrintFormat(t *testing.T) { withTestTerminal("testvariables2", t, func(term *FakeTerminal) { term.MustExec("continue")