Skip to content

--inspect should automatically get a new port if default port 9229 is already in use #28457

Closed
@gustavomassa

Description

@gustavomassa

image

Is your feature request related to a problem? Please describe.
Image a kubernetes cluster using minikube with 50 micro-services on a dev environment, each micro-service is launched using the --inspect param, so we can remotely debug the services, like using vs-code kubernetes extension. In that case, just using --inspect or --inspect-brk will try to use the same inspector port 9229 for each micro-service, resulting on startup errors and services not running at all.
image

Describe the solution you'd like
--inspect and --inspect-brk should try the default port 9229, if the port is already in use, automatically get a random port that is not in use, or just increment the current port number until the port is available.

Describe alternatives you've considered
Manually setting an unique inspect port for each service. It means we must manually hard-code each unique inspector port for each micro-service config.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions