[Python] In launch configs, can we feed in dynamic ports?

Discussão em 'Python' iniciado por Stack, Janeiro 31, 2025.

  1. Stack

    Stack Membro Participativo

    I want to utilize the VSCode launch configuration for Python debugpy against a docker container process that exposes a dynamic port. The reason it exposes is a dynamic port is because we have multiple similar code bases that can run concurrently on a dev system and we want to avoid port conflict. The problem is I don't know how programmatically I can feed in a random port to this VSCode launch configuration process. Any advice here?

    One strategy I was thinking about would be to generate the entire launch config as a hook after I spin up the service.

    I haven't tried anything specific beyond looking through the documentation for a possible solution so far.

    Continue reading...

Compartilhe esta Página