{"record":{"id":"d54792dbc7286cc8","repo":"GoogleContainerTools/skaffold","slug":"retrieving-debug-helpers-registry-w","errorCode":null,"errorMessage":"retrieving debug helpers registry: %w","messagePattern":"retrieving debug helpers registry: %w","errorType":"exception","errorClass":"DebugHelperRetrieveErr","httpStatus":null,"severity":"error","filePath":"pkg/skaffold/deploy/docker/deploy.go","lineNumber":97,"sourceCode":"}\n\nfunc NewDeployer(ctx context.Context, cfg dockerutil.Config, labeller *label.DefaultLabeller, d *latest.DockerDeploy, resources []*latest.PortForwardResource, configName string) (*Deployer, error) {\n\tclient, err := dockerutil.NewAPIClient(ctx, cfg)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\ttracker := tracker.NewContainerTracker()\n\tl, err := logger.NewLogger(ctx, tracker, cfg, true)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar dbg *debugger.DebugManager\n\tif cfg.ContainerDebugging() {\n\t\tdebugHelpersRegistry, err := config.GetDebugHelpersRegistry(cfg.GlobalConfig())\n\t\tif err != nil {\n\t\t\treturn nil, deployerr.DebugHelperRetrieveErr(fmt.Errorf(\"retrieving debug helpers registry: %w\", err))\n\t\t}\n\t\tdbg = debugger.NewDebugManager(cfg.GetInsecureRegistries(), debugHelpersRegistry)\n\t}\n\n\treturn &Deployer{\n\t\tconfigName:         configName,\n\t\tcfg:                d,\n\t\tclient:             client,\n\t\tnetwork:            fmt.Sprintf(\"skaffold-network-%s\", labeller.GetRunID()),\n\t\tnetworkDeployed:    false,\n\t\tresources:          resources,\n\t\tglobalConfig:       cfg.GlobalConfig(),\n\t\tinsecureRegistries: cfg.GetInsecureRegistries(),\n\t\ttracker:            tracker,\n\t\tportManager:        dockerport.NewPortManager(), // fulfills Accessor interface\n\t\tdebugger:           dbg,\n\t\tlogger:             l,\n\t\tmonitor:            &status.NoopMonitor{},","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/deploy/docker/deploy.go#L79-L115","documentation":"When container debugging is enabled (`ContainerDebugging()`), the Docker deployer needs a registry of debug helper images, read from the user's skaffold global config via `config.GetDebugHelpersRegistry`. If reading that configuration fails, NewDeployer wraps the error with DebugHelperRetrieveErr.","triggerScenarios":"Running `skaffold dev/run --container-debugging` (or debugging via IDE integration) while the global config (~/.skaffold/config) is unreadable, malformed, or the debug-helpers registry field cannot be resolved.","commonSituations":"Corrupted or hand-edited ~/.skaffold/config; permissions issues on the config file; invalid registry value that fails validation.","solutions":["Inspect and repair or delete ~/.skaffold/config (skaffold recreates it on next run)","Set the debug helpers registry explicitly, e.g. `skaffold config set debug-helpers-registry <registry>`, ensuring the registry value is valid","Run with --container-debugging disabled if debugging helpers are not needed"],"exampleFix":"// before (corrupted global config)\n{ \"debug-helpers-registry\": \"\" ,,\n\n// after (reset and set properly)\nrm ~/.skaffold/config\nskaffold config set debug-helpers-registry gcr.io/my-project","handlingStrategy":"try-catch","validationCode":"if _, err := os.Stat(filepath.Join(home, \".skaffold\", \"config\")); err == nil {\n    if data, err := os.ReadFile(filepath.Join(home, \".skaffold\", \"config\")); err == nil {\n        var m map[string]interface{}\n        if json.Unmarshal(data, &m) != nil {\n            // corrupted config; back it up and remove before running skaffold\n        }\n    }\n}\n","typeGuard":null,"tryCatchPattern":"if err := runSkaffoldWithDebugging(); err != nil {\n    var dbgErr *skaffold.Error\n    if errors.As(err, &dbgErr) && dbgErr.ErrCode == proto.StatusCode_DEPLOY_DEBUG_HELPER_RETRIEVE_ERR {\n        // reset ~/.skaffold/config and retry\n        os.Remove(filepath.Join(home, \".skaffold\", \"config\"))\n    }\n}\n","preventionTips":["Avoid hand-editing ~/.skaffold/config; use `skaffold config set`","Run with debugging enabled only when needed; disable --container-debugging otherwise","Check file permissions on ~/.skaffold/config in shared/CI environments"],"tags":["docker","debugging","config"],"backgroundTag":"config-load-failed","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}