diff --git a/pkg/build/gobuild.go b/pkg/build/gobuild.go index b5b397c31..762a4b19c 100644 --- a/pkg/build/gobuild.go +++ b/pkg/build/gobuild.go @@ -1003,6 +1003,7 @@ func (g *gobuild) buildOne(ctx context.Context, refStr string, base v1.Image, pl } } if g.debug && !doesPlatformSupportDebugging(*platform) { + log.Printf("image for platform %q will be built without debugging enabled because debugging is not supported for that platform", *platform) return nil, fmt.Errorf("debugging is not supported for %s", platform) } @@ -1116,7 +1117,7 @@ func (g *gobuild) buildOne(ctx context.Context, refStr string, base v1.Image, pl }) delvePath := "" // path for delve in image - if g.debug { + if g.debug && doesPlatformSupportDebugging(*platform) { // get delve locally delveBinary, err := getDelve(ctx, *platform) if err != nil {