{"record":{"id":"7636dfb625102d20","repo":"go-delve/delve","slug":"failed-to-write-hit-condition-to-file-d-s","errorCode":null,"errorMessage":"failed to write hit condition to file %d:%s","messagePattern":"failed to write hit condition to file (.+?):(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/terminal/command.go","lineNumber":1762,"sourceCode":"\t\t\t\t_, err = fmt.Fprintf(w, \"break %s %s:%d\\n\", aliaser(bp), bp.File, bp.Line)\n\t\t\t}\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"failed to write breakpoint to file %s:%d\", bp.File, bp.Line)\n\t\t\t}\n\t\t\tif len(bp.Cond) > 0 {\n\t\t\t\t_, err = fmt.Fprintf(w, \"condition %s %s\\n\", aliaser(bp), bp.Cond)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"failed to write condition to file %d:%s\", bp.ID, bp.Cond)\n\t\t\t\t}\n\t\t\t}\n\t\t\tif bp.HitCond != \"\" {\n\t\t\t\tif bp.HitCondPerG {\n\t\t\t\t\t_, err = fmt.Fprintf(w, \"condition -per-g-hitcount %s %s\\n\", aliaser(bp), bp.HitCond)\n\t\t\t\t} else {\n\t\t\t\t\t_, err = fmt.Fprintf(w, \"condition -hitcount %s %s\\n\", aliaser(bp), bp.HitCond)\n\t\t\t\t}\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"failed to write hit condition to file %d:%s\", bp.ID, bp.HitCond)\n\t\t\t\t}\n\t\t\t}\n\t\t\tif bp.Disabled {\n\t\t\t\t_, err = fmt.Fprintf(w, \"toggle %s\\n\", aliaser(bp))\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"failed to write breakpoint status to file %d\", bp.ID)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfmt.Printf(\"Breakpoints successfully saved to '%s'\\n\", saveFile)\n\t\treturn nil\n\t}\n\n\t// Display breakpoints (original functionality)\n\tslices.SortFunc(breakPoints, func(a, b *api.Breakpoint) int { return cmp.Compare(a.ID, b.ID) })\n\tfor _, bp := range breakPoints {\n\t\tenabled := \"(enabled)\"","sourceCodeStart":1744,"sourceCodeEnd":1780,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/terminal/command.go#L1744-L1780","documentation":"Error \"failed to write hit condition to file %d:%s\" thrown in go-delve/delve.","triggerScenarios":"Thrown at pkg/terminal/command.go:1762 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}