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.
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.
The short answer is no
you cannot do this natively in VSCode unless you leverage an extension.