Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Ability to configure the local port(s) being forwarded when debugging in Visual Studio #270

Open
Chipzter opened this issue Jan 25, 2020 · 4 comments

Comments

@Chipzter
Copy link

Is your feature request related to a problem? Please describe.
Due to NSG rules in our AKS clusters, We need to access the debugged service using the port forwarded from localhost. Additionally, we need to use the same local port every time since the host:port combination needs to be the same as in the registered reply URL in AAD. This can be achieved in VS Code by adding the --port option to the "azds: prelaunch" task in tasks.json, but I cannot find any way of achieving the same thing in Visual Studio which is a bit of a blocker for those in our teams who prefer the Visual Studio IDE.

Describe the solution you'd like
I want to be able to specify local port(s) to forward in the project debug options in the project properties screen in Visual Studio.

Describe alternatives you've considered
One work-around is to manually run kubectl port-forward every time you start a new debugging session. This works, but it's a hassle.

@dbreshears
Copy link

@Chipzter , confirmed that we currently do not allow specifying the local port and not sure there is any other workaround in the VS tooling. We will investigate giving the ability to specify the port in a future VS update. thanks!

@ahaeber
Copy link

ahaeber commented Apr 3, 2020

@dbreshears please consider adding this support to the azds client so it can also be leveraged in other environments (e.g., working CLI-only or other IDEs) than VS. For example allow specifying ports in azds.yaml or parameters to azds up.

@rakeshvanga
Copy link
Contributor

@ahaeber, On CLI, you can specify a local port for the port forwarding for azds up command.
Copying the help text here but you can find more information by running azds up --help.

 -p|--port              Ports from the dev space workload to expose locally using the format --port <local1>:<remote1> --port <local2>:<remote2>

@ahaeber
Copy link

ahaeber commented Apr 3, 2020 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants