Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LocalHttpPort not honored in VS #823

Open
JohnReeson opened this issue Oct 24, 2018 · 13 comments
Open

LocalHttpPort not honored in VS #823

JohnReeson opened this issue Oct 24, 2018 · 13 comments

Comments

@JohnReeson
Copy link

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
@SiliconOrchid
Copy link

SiliconOrchid commented Apr 29, 2019

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

@ahmedelnably
Copy link
Contributor

@ColbyTresness can you please track this with VS team?

@worldspawn
Copy link

Still broken April 2020...

@anthonychu
Copy link
Member

@soninaren Do you know what the problem might be here? Thanks.

@MhAllan
Copy link

MhAllan commented Sep 12, 2020

wow! since 2018? anybody lives in this repo 😁?

@soninaren soninaren added this to the Triaged milestone Sep 14, 2020
@tudor33sud
Copy link

+1. I still can't change the port!!!

@TobiStr
Copy link

TobiStr commented Jan 25, 2021

Same problem here in 2021.

@pmrogala
Copy link

Bump

@anthonychu
Copy link
Member

@vijayrkn Do you know if VS does anything to override this setting?

@MhAllan
Copy link

MhAllan commented Feb 26, 2022

interesting.

@tomanizer
Copy link

same issue in March 2022. Still no fix or workaround or idea for this?

@oneolddev
Copy link

@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.

@oneolddev
Copy link

Looks like this problem is recurrurrent 🤔. I found the following as well Azure/Azure-Functions#584 (comment)

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

No branches or pull requests