azure-functions-core-tools
azure-functions-core-tools copied to clipboard
LocalHttpPort not honored in VS
See the sample of local.settings.json. It says
The --port command-line option takes precedence over this value.
Is it the reason that LocalHttpPort doesn't work in VS(set --port 7071 somewhere by default) , while using the standalone CLI installed by npm it does? Both CLI have the same version.
Azure Functions Core Tools (2.1.748 Commit hash: 5db20665cf0c11bedaffc96d81c9baef7456acb3)
Function Runtime Version: 2.0.12134.0
I've just encountered this same issue today, 6 months later, using VS2019.
Echoing the original report that Host:LocalHttpPort
setting is ignored by VS when debugging an Azure Function locally. It sticks to using port 7071.
When running from CLI, it correctly uses the user-specified port #.
Curious to know if there is something we should be doing differently when using VS (short of perhaps trying command switches in the project config -> debug -> 'application arguments' ??).
The impact is that presumably, we can't debug multiple concurrent Function projects, because ports will conflict?
Edit: Just to add, I have found mentions of this issue back in June 2017, in this GitHub Discussion
@ColbyTresness can you please track this with VS team?
Still broken April 2020...
@soninaren Do you know what the problem might be here? Thanks.
wow! since 2018? anybody lives in this repo 😁?
+1. I still can't change the port!!!
Same problem here in 2021.
Bump
@vijayrkn Do you know if VS does anything to override this setting?
interesting.
same issue in March 2022. Still no fix or workaround or idea for this?
@tomanizer
I just came across the same issue. Look under the Properties folder for launchSettings.json . Visual Studio 2022 was overriding the LocalHttpPort in the local.settings.json with the one provided in launchSettings.json
I hope that helps.
Looks like this problem is recurrurrent 🤔. I found the following as well https://github.com/Azure/Azure-Functions/issues/584#issuecomment-343529583