go-delve/delve · error
failed to write condition to file %d:%s
Error message
failed to write condition to file %d:%s
What it means
Error "failed to write condition to file %d:%s" thrown in go-delve/delve.
Source
Thrown at pkg/terminal/command.go:1752
}
// Skip watchpoints as they can't be reliably restored
if bp.WatchExpr != "" {
continue
}
var err error
if bp.Tracepoint {
_, err = fmt.Fprintf(w, "trace %s %s:%d\n", aliaser(bp), bp.File, bp.Line)
} else {
_, err = fmt.Fprintf(w, "break %s %s:%d\n", aliaser(bp), bp.File, bp.Line)
}
if err != nil {
return fmt.Errorf("failed to write breakpoint to file %s:%d", bp.File, bp.Line)
}
if len(bp.Cond) > 0 {
_, err = fmt.Fprintf(w, "condition %s %s\n", aliaser(bp), bp.Cond)
if err != nil {
return fmt.Errorf("failed to write condition to file %d:%s", bp.ID, bp.Cond)
}
}
if bp.HitCond != "" {
if bp.HitCondPerG {
_, err = fmt.Fprintf(w, "condition -per-g-hitcount %s %s\n", aliaser(bp), bp.HitCond)
} else {
_, err = fmt.Fprintf(w, "condition -hitcount %s %s\n", aliaser(bp), bp.HitCond)
}
if err != nil {
return fmt.Errorf("failed to write hit condition to file %d:%s", bp.ID, bp.HitCond)
}
}
if bp.Disabled {
_, err = fmt.Fprintf(w, "toggle %s\n", aliaser(bp))
if err != nil {
return fmt.Errorf("failed to write breakpoint status to file %d", bp.ID)
}
}View on GitHub (pinned to a23773e6c3)
When it happens
Trigger: Thrown at pkg/terminal/command.go:1752 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of go-delve/delve@a23773e6c3 (2026-08-31).
Data as JSON: /api/errors/c5144781b17c3a3f.
Report an issue: GitHub.