In this part we’ll see how to Debug the code on local.
- Once we done with the configuration settings the next step is to call the REST API in our code, here we are using C# for the development.
- Once we done with the code logic, we can run the code on local by adding the breakpoint The Azure Function app will launch in a local Functions host, and your trigger will be available locally on http://localhost:7071/api/Function1 default listening port is 7071, we can also change the port number by going to the project setting and setting Application arguments to the project settings.
host start –pause-on-error –port 7079
- We can also launch multiple apps at the same time, we can do this by adding multiple breakpoint at the same time and then start the function without debugging and start another function through debugger and attached the debugger to function app by,
- Select Debug > Attach to process.
- Search for fun
- The greyed-out function is in running state and other is running through debugger. Select the other and click Attach and then we can open the browser and run the both function app different port gets assigned to each function.
- Publish the App on the Azure and make sure to add the all the parameters on the configuration by going to the Configuration on the Function App.
Note:- For every changes on app we need to build and publish the app.