go-delve/delve · error
no breakpoint with name %s
Error message
no breakpoint with name %s
What it means
RPCServer.GetBreakpoint looks up a breakpoint by Name when arg.Name is non-empty; if debugger.FindBreakpointByName returns nil, the RPC returns this error. It is a normal not-found condition, not a fault in the debugger.
Source
Thrown at service/rpc2/server.go:182
return nil
}
type GetBreakpointIn struct {
Id int
Name string
}
type GetBreakpointOut struct {
Breakpoint api.Breakpoint
}
// GetBreakpoint gets a breakpoint by Name (if Name is not an empty string) or by ID.
func (s *RPCServer) GetBreakpoint(arg GetBreakpointIn, out *GetBreakpointOut) error {
var bp *api.Breakpoint
if arg.Name != "" {
bp = s.debugger.FindBreakpointByName(arg.Name)
if bp == nil {
return fmt.Errorf("no breakpoint with name %s", arg.Name)
}
} else {
bp = s.debugger.FindBreakpoint(arg.Id)
if bp == nil {
return fmt.Errorf("no breakpoint with id %d", arg.Id)
}
}
out.Breakpoint = *bp
return nil
}
type StacktraceIn struct {
Id int64
Depth int
Full bool
Defers bool // read deferred functions (equivalent to passing StacktraceReadDefers in Opts)
Opts api.StacktraceOptions
Cfg *api.LoadConfigView on GitHub (pinned to a23773e6c3)
Solutions
- List existing breakpoints first (ListBreakpoints RPC) and use an exact existing name
- Create the named breakpoint with CreateBreakpoint before querying it
- If the id is known, call GetBreakpoint with Id instead of Name
- Guard the call: treat this error as not-found and fall back to creating the breakpoint
Example fix
// before
bp, err := client.GetBreakpoint(&api.GetBreakpointIn{Name: "main-loop"})
// after
bps, _ := client.ListBreakpoints(false)
for _, b := range bps {
if b.Name == "main-loop" { /* found */ }
} Defensive patterns
Strategy: try-catch
Validate before calling
bps, err := client.ListBreakpoints(false)
exists := func(name string) bool {
for _, b := range bps { if b.Name == name { return true } }
return false
} Try / catch
_, err := client.GetBreakpoint(&api.GetBreakpointIn{Name: name})
if err != nil && strings.Contains(err.Error(), "no breakpoint with name") {
// create it: client.CreateBreakpoint(...)
} Prevention
- Call ListBreakpoints before GetBreakpoint by name
- Use exact, unique breakpoint names
- Re-sync named breakpoints after Restart or reattach
- Treat not-found as recoverable, not fatal
When it happens
Trigger: GetBreakpoint RPC called with GetBreakpointIn{Name: "x"} where no breakpoint with that user-assigned name exists in the current session.
Common situations: Typo in breakpoint name; breakpoint was cleared earlier; connecting a client to a fresh debug session that has no named breakpoints.
Related errors
- no breakpoint with id %d
- breakpoint exception
- too many arguments to trace
- filter not supported on breakpoint
- breakpoint name can not be a number
AI-assisted analysis of go-delve/delve@a23773e6c3 (2026-08-31).
Data as JSON: /api/errors/a5f227628e5ebcd9.
Report an issue: GitHub.