Running two containers simultaneously in Visual Studio code extension V1


I have a situation where I want to debug two .NET applications in two different instances of Visual Studio using your extension V1. On both applications network is in host mode. I can run either one, but not both at the same time. Extension is giving me errors: “Port should be >= 0 and < 65536. Received type number (-1).” and “Error starting application container.” when I try to start second application while the first one is running. I think there is a problem with port 2222 where extension are making SSH connection for debugging console for second application which is already open for the first application.

Can I change the port of SSH connection for debugging console? Or is there any other solution?

I also tried to start the container manually without the extension, but I also have problems where when I try to start the image created by the extension manually through the Linux terminal with the docker run command that I extract from Visual Studio using Torizon: extract docker command line, the application does not start. When I enter the console of the running container, it is empty and there are no files related to the application. Do I have to run it manually with dotnet run or do I have to do something else?

I use .NET6 and arm64 60 bullseye type containers.

Best Regards,

Hi @fvodopive ,

From what I was informed internally the debug SSH connection port on the IDE Extension 1 is hardcoded, so this can’t be easily changed.

Is there any specific reason you’re using the IDE Extension 1? I’d recommend using the IDE Extension 2, as it allows you to configure the ports and it has a multi-container template.

For now the IDE Extension 2 templates are ready to be used on Torizon OS 6 (bookworm). If you’re on Torizon OS 5 there are bullseye versions of the templates that you can use:

Best regards,
Lucas Akira