From 75f41dff259d0e97985cd26e600f9d7941075787 Mon Sep 17 00:00:00 2001 From: Ronen Hilewicz Date: Tue, 3 Dec 2024 11:52:58 -0500 Subject: [PATCH] CLI: Expose debug port if the service is enabled (#506) --- pkg/cc/config/loader.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/cc/config/loader.go b/pkg/cc/config/loader.go index 1b9c5b22..a408f877 100644 --- a/pkg/cc/config/loader.go +++ b/pkg/cc/config/loader.go @@ -168,6 +168,14 @@ func (l *Loader) GetPorts() ([]string, error) { portMap[port] = true } + if l.Configuration.DebugService.Enabled && l.Configuration.DebugService.ListenAddress != "" { + port, err := getPortFromAddress(l.Configuration.DebugService.ListenAddress) + if err != nil { + return nil, err + } + portMap[port] = true + } + for _, value := range l.Configuration.APIConfig.Services { if value.GRPC.ListenAddress != "" { port, err := getPortFromAddress(value.GRPC.ListenAddress)