{"record":{"id":"c5144781b17c3a3f","repo":"go-delve/delve","slug":"failed-to-write-condition-to-file-d-s","errorCode":null,"errorMessage":"failed to write condition to file %d:%s","messagePattern":"failed to write condition to file (.+?):(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/terminal/command.go","lineNumber":1752,"sourceCode":"\t\t\t}\n\t\t\t// Skip watchpoints as they can't be reliably restored\n\t\t\tif bp.WatchExpr != \"\" {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tvar err error\n\t\t\tif bp.Tracepoint {\n\t\t\t\t_, err = fmt.Fprintf(w, \"trace %s %s:%d\\n\", aliaser(bp), bp.File, bp.Line)\n\t\t\t} else {\n\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}","sourceCodeStart":1734,"sourceCodeEnd":1770,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/terminal/command.go#L1734-L1770","documentation":"Error \"failed to write condition to file %d:%s\" thrown in go-delve/delve.","triggerScenarios":"Thrown at pkg/terminal/command.go:1752 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"}