Remote debugging in the cloud
The remote debugging of a Function App can be helpful if the function experiences an issue only after deployment. To debug the function in Azure, you can attach the debugger to the Function App. This will allow you to step through the deployed function in Visual Studio.
To perform remote debugging, execute the following steps:
- First, we need to change two settings in Visual Studio to enable remote debugging. In Visual Studio, navigate to
Tools
->Options
->Debugging
, and then deselect theEnable Just My Code
andRequire source files to exactly match the original version
options as shown in the following screenshot:
- In Visual Studio, navigate to
View
->Cloud Explorer.
- Navigate to your subscription ->
App Services
->TextEvaluation
. - Right-click on the service and choose
Attach Debugger
. - After the debug symbols load, you will be able to set up breakpoints and step through the function. To hit a breakpoint, you will need to trigger the function execution...