How to debug Remote Event Receiver for Sharepoint Online? The only article that I can find is this, https://blog.virtosoftware.com/remote-event-receivers-creating-and-debugging-sharepoint-online/ however is there another way to debug a remote event receiver
2 Answers
There are two way to debug your RERs:
- Remote debugging
- Local debugging
Remote debugging is convenient, but it requires a lot of prerequisites:
- deploy your app in Azure
- remotely attach from Visual Studio to your Azure Web app instance and debug
It takes time and sometimes doesn't work stable.
From the other hand local debugging is much faster, allows you to modify code without re-deploying to host, however, requires a few setup steps.
- Install nodejs and
ngrok
service - Starting
ngrok
and creating a RER, which points to your ngrok service, instead of real URL. - Testing your RER locally by pressing F5 in Visual Studio
A good reading about local debug approach available here.
-
2
We currently use this devtunnel tool provided by MS https://learn.microsoft.com/en-us/azure/developer/dev-tunnels/get-started?tabs=windows You can host a tunnel to your project hosted locally Its similar to Ngrok but free to use