I have a solution in Visual Studio 2022 with multiple Azure Functions projects in it. The projects are in .NET 4.8 using the v1 of the function run-time.
When debugging locally I want all the function applications to run. I set them all as startup projects in my solution configuration. I had already found that I can change the default port for the function app by setting a command line argument in the debug launch profile, like so.
The issue is that they all want to bind to port 5858 for debugging. Additional research uncovered the --nodeDebugPort
argument. I added that to the debug profile but when I run from Visual Studio by hitting F5 they all still want to use 5858. However, if I run them from the command-line using the following command they will honor the debug port setting.
..\..\..\node_modules\azure-functions-core-tools\bin\func host start --port 7072 --nodeDebugPort 5859
Any idea why the debug port argument is ignored when running from Visual Studio but honored when running from command line?