{"record":{"id":"65f8bb7139bbf6be","repo":"GoogleContainerTools/skaffold","slug":"setting-up-debugger","errorCode":null,"errorMessage":"setting up debugger","messagePattern":"setting up debugger","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/deploy/docker/deploy.go","lineNumber":193,"sourceCode":"\t}\n\n\tcontainerCfg, err := d.containerConfigFromImage(ctx, artifact.Tag)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tcontainerName := d.getContainerName(ctx, artifact.ImageName)\n\topts := dockerutil.ContainerCreateOpts{\n\t\tName:            containerName,\n\t\tNetwork:         d.network,\n\t\tContainerConfig: containerCfg,\n\t}\n\n\tvar debugBindings network.PortMap\n\tif d.debugger != nil {\n\t\tdebugBindings, err = d.setupDebugging(ctx, out, artifact, containerCfg)\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, \"setting up debugger\")\n\t\t}\n\n\t\t// mount all debug support container volumes into the application container\n\t\tvar mounts []mount.Mount\n\t\tfor _, m := range d.debugger.SupportMounts() {\n\t\t\tmounts = append(mounts, m)\n\t\t}\n\t\topts.Mounts = mounts\n\t}\n\n\t// Filter for the port resource for the given artifact.ImageName\n\tfilteredPFResources := d.filterPortForwardingResources(artifact.ImageName)\n\n\tbindings, err := d.portManager.AllocatePorts(artifact.ImageName, filteredPFResources, containerCfg, debugBindings)\n\tif err != nil {\n\t\treturn err\n\t}\n\topts.Bindings = bindings","sourceCodeStart":175,"sourceCodeEnd":211,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/deploy/docker/deploy.go#L175-L211","documentation":"The docker Deployer's deploy step, when a debugger is configured (debug helper), calls setupDebugging to compute debug port bindings and support mounts for the artifact container. Any failure inside that setup is wrapped as \"setting up debugger\". Without it, the container would run but be un-debuggable, so deploy aborts.","triggerScenarios":"Calling Deploy on a docker deployer with debugger != nil when setupDebugging fails: the artifact image lacks the runtime the debugger expects, the debug configuration for the language is unsupported/invalid, image inspection fails, or port binding computation errors.","commonSituations":"`skaffold debug` (or a profile with debug: true) against an image built without the required tooling; unsupported language/runtime version inside the image; image pull/inspect failure; debug ports already occupied on the host.","solutions":["Read the unwrapped inner error — it identifies whether image inspection, runtime detection, or port setup failed.","Rebuild the image so it contains a supported runtime and debug support (e.g. correct Go/JVM/Node/Python version).","Verify the artifact type/language is supported by skaffold debug for docker deploys.","Free or remap conflicting debug ports on the host.","If debugging is not needed, deploy without the debug profile enabled."],"exampleFix":"// before\nskaffold dev --profile debug\n// after\n# ensure the image is rebuilt with debug support, then\nskaffold build && skaffold dev --profile debug","handlingStrategy":"validation","validationCode":"// before enabling debug, confirm runtime support in the image\ninspect, err := cli.ImageInspect(ctx, image)\nif err != nil { return fmt.Errorf(\"cannot inspect %s: %w\", image, err) }","typeGuard":null,"tryCatchPattern":"// Go\nif _, err := d.Deploy(ctx, out, artifacts); err != nil {\n    if strings.Contains(err.Error(), \"setting up debugger\") {\n        log.Print(\"debug setup failed; retrying deploy without debug profile\")\n    }\n}","preventionTips":["Build images with supported runtimes before using the debug profile.","Confirm the artifact language is supported by skaffold debug.","Keep debug ports free on the host."],"tags":["docker","debugging","skaffold","deploy"],"backgroundTag":"debugger-setup-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"}