{"record":{"id":"e311577c85329367","repo":"go-delve/delve","slug":"errnodebuginfofound","errorCode":"ErrNoDebugInfoFound","errorMessage":"could not open debug info","messagePattern":"could not open debug info","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/proc/bininfo.go","lineNumber":134,"sourceCode":"\tregabi bool\n\n\tdebugPinnerFn *Function\n\tlogger        logflags.Logger\n\teventsFn      func(*Event)\n\n\tcancelDownloadsMu sync.Mutex\n\tcancelDownloads   func()\n\tdownloadsCtx      context.Context\n}\n\nvar (\n\t// ErrCouldNotDetermineRelocation is an error returned when Delve could not determine the base address of a\n\t// position independent executable.\n\tErrCouldNotDetermineRelocation = errors.New(\"could not determine the base address of a PIE\")\n\n\t// ErrNoDebugInfoFound is returned when Delve cannot open the debug_info\n\t// section or find an external debug info file.\n\tErrNoDebugInfoFound = errors.New(\"could not open debug info\")\n)\n\nvar (\n\tsupportedLinuxArch = map[elf.Machine]bool{\n\t\telf.EM_X86_64:    true,\n\t\telf.EM_AARCH64:   true,\n\t\telf.EM_386:       true,\n\t\telf.EM_PPC64:     true,\n\t\telf.EM_RISCV:     true,\n\t\telf.EM_LOONGARCH: true,\n\t}\n\n\tsupportedWindowsArch = map[_PEMachine]bool{\n\t\t_IMAGE_FILE_MACHINE_AMD64: true,\n\t\t_IMAGE_FILE_MACHINE_ARM64: true,\n\t}\n\n\tsupportedDarwinArch = map[macho.Cpu]bool{","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/bininfo.go#L116-L152","documentation":"ErrNoDebugInfoFound is returned when Delve can neither read a .debug_info section from the executable nor locate an external debug info file (e.g. via the GNU debuglink or build-id path). Without DWARF debug_info, no types, variables, or source-level breakpoint mapping can be resolved, so loading binary info aborts with this sentinel error.","triggerScenarios":"Loading a binary built with -ldflags=\"-s -w\" or without any -gcflags debug info; a stripped executable whose separate debug file is missing from the debuglink location.","commonSituations":"Debugging stripped production binaries; separating debug symbols into -dbg packages but running on a machine where the package isn't installed; Docker scratch images containing only the stripped binary.","solutions":["Rebuild with debug info: go build without -s -w (default go build keeps DWARF)","Install the matching debug symbols package (e.g. debian -dbgsym) so the debuglink/build-id resolves","Place the .debug file in one of the searched locations: alongside the binary, ./​.debug/, /usr/lib/debug/","Point Delve at an unstripped copy of the same binary"],"exampleFix":"// before\nCGO_ENABLED=0 go build -ldflags=\"-s -w\" -o app .   // stripped, no debug_info\n// after\ngo build -o app .   // DWARF retained","handlingStrategy":"try-catch","validationCode":"func hasDebugInfo(path string) bool {\n    f, err := os.Open(path); if err != nil { return false }\n    defer f.Close()\n    ef, err := elf.NewFile(f); if err != nil { return false }\n    return ef.Section(\".debug_info\") != nil\n}","typeGuard":"func isNoDebugInfo(err error) bool {\n    return errors.Is(err, proc.ErrNoDebugInfoFound)\n}","tryCatchPattern":"if err := loadErr; err != nil {\n    if errors.Is(err, proc.ErrNoDebugInfoFound) {\n        // prompt user to rebuild unstripped or install dbgsym package\n    }\n}","preventionTips":["Check for .debug_info with readelf -S before debugging","Never ship/launch binaries built with -ldflags \"-s -w\" for debugging","Install matching -dbgsym/-debuginfo packages on the target machine"],"tags":["dwarf","debug-info","elf","stripped-binary"],"backgroundTag":"missing-debug-info","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}