{"record":{"id":"31d2f09de42379a7","repo":"go-delve/delve","slug":"internal-error-unknown-breakpoint-kind-v","errorCode":null,"errorMessage":"internal error unknown breakpoint kind %v","messagePattern":"internal error unknown breakpoint kind (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/proc/breakpoints.go","lineNumber":350,"sourceCode":"\t\tactive = active && nextDeferOk\n\n\tcase WatchOutOfScopeBreakpoint:\n\t\tif breaklet.checkPanicCall {\n\t\t\tframes, err := ThreadStacktrace(tgt, thread, 2)\n\t\t\tif err == nil {\n\t\t\t\tipc, _ := isPanicCall(frames)\n\t\t\t\tactive = active && ipc\n\t\t\t}\n\t\t}\n\n\tcase StackResizeBreakpoint, PluginOpenBreakpoint, StepIntoNewProcBreakpoint, StepIntoRangeOverFuncBodyBreakpoint, SharedLibBreakpoint:\n\t\t// no further checks\n\n\tcase NextInactivatedBreakpoint:\n\t\tactive = false\n\n\tdefault:\n\t\tbpstate.CondError = fmt.Errorf(\"internal error unknown breakpoint kind %v\", breaklet.Kind)\n\t}\n\n\tif active {\n\t\tif breaklet.callback != nil {\n\t\t\tvar err error\n\t\t\tactive, err = breaklet.callback(thread, tgt)\n\t\t\tif err != nil && bpstate.CondError == nil {\n\t\t\t\tbpstate.CondError = err\n\t\t\t}\n\t\t}\n\t\tbpstate.Active = active\n\t}\n\n\tif bpstate.Active {\n\t\tswitch breaklet.Kind {\n\t\tcase NextBreakpoint, NextDeferBreakpoint:\n\t\t\tbpstate.Stepping = true\n\t\tcase StepBreakpoint:","sourceCodeStart":332,"sourceCodeEnd":368,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/breakpoints.go#L332-L368","documentation":"Set as bpstate.CondError in checkCond (pkg/proc/breakpoints.go:350) when a breakpoint's Breaklet.Kind does not match any known kind in the switch. This is an internal invariant violation: every Breaklet created by Delve must have a recognized Kind (UserBreakpoint, stepping kinds, watch/scope kinds, etc.). A user of the library only sees it if Delve itself is inconsistent or if internal breakpoint kinds were fabricated incorrectly.","triggerScenarios":"A Breaklet whose Kind value is not handled by the switch in checkCond reaches breakpoint hit evaluation (checkCondition -> checkCond), e.g. after adding a new breakpoint kind without updating checkCond, bit-flag combinations of stepping kinds that don't match any case, or memory corruption of the Breakpoint struct.","commonSituations":"Running a development/patched Delve with a newly added breakpoint kind that forgot the checkCond case; combining breaklet kinds (they are bit flags) into an unhandled composite value; bugs fixed in newer Delve releases.","solutions":["Upgrade Delve to the latest version — if reproducible on a released version, it is a bug.","Search the Delve source for where the offending Kind value is created and add a corresponding case in checkCond (pkg/proc/breakpoints.go:308-351).","Reproduce with a minimal scenario and file a Delve issue including the kind value printed in the message.","As a workaround, avoid the feature that creates the exotic breakpoint (e.g. specific stepping modes) until fixed."],"exampleFix":"// before: new kind added but unhandled in checkCond\ncase StackResizeBreakpoint, PluginOpenBreakpoint, StepIntoNewProcBreakpoint:\n    // no further checks\n\n// after: include the new kind in the handled set\ncase StackResizeBreakpoint, PluginOpenBreakpoint, StepIntoNewProcBreakpoint, MyNewBreakpointKind:\n    // no further checks","handlingStrategy":"fallback","validationCode":"// Library-side sanity check before hitting evaluation:\nfor _, bl := range bp.Breaklets {\n    if bl.Kind&(UserBreakpoint|StepBreakpoint|NextBreakpoint|NextDeferBreakpoint|\n        WatchOutOfScopeBreakpoint|StackResizeBreakpoint|PluginOpenBreakpoint|\n        StepIntoNewProcBreakpoint|StepIntoRangeOverFuncBodyBreakpoint|\n        SharedLibBreakpoint|NextInactivatedBreakpoint) == 0 {\n        panic(fmt.Sprintf(\"unhandled breakpoint kind %v\", bl.Kind))\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["When adding a new Breaklet kind, update every switch over Kind (checkCond, the Stepping switch) in the same change.","Run the full `make test` suite after touching breakpoint kinds.","Treat any occurrence on a released Delve as a bug and upgrade/report immediately.","Avoid manually constructing Breaklet values with arbitrary or composite kind bit patterns."],"tags":["go","debugging","breakpoints","internal-error","invariant-violation"],"backgroundTag":"unknown-breakpoint-kind","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}