This post outline the steps to debug the AZURE app service using Visual Studio 2017 or Visual Studio 2015.
Before you start remote debugging the application make sure you deployed your web app to azure using debug settings not release.
Enable remote debug and visual studio version for your app service web app in AZURE portal
You can attach the debugger in two way one is from cloud explorer as follows. right click on desire web app and say attach debugger
other way is go to debug menu and say attach process
when it prompts enter the publishing profile credentials for the same
publishing profile credentials can be downloaded from portal as below
if still cant attach the process then check your corporate network firewall not blocking outbound port 4022 for visual studio 2017 and 4020 for visual studio 2015.
If your local policies or firewall rules canâ€™t be changed then create virtual machine with VS 2015 or 2017 in azure and try to connect from virtual machine to your web app. This option should definitely works.
More on this topic can be read https://blogs.msdn.microsoft.com/benjaminperkins/2016/09/22/remote-debug-your-azure-app-service-web-app/