I\'ve got an ASP.NET website that I deployed to Azure. I\'m using VS2013, .NET 4.5.1 and Azure SDK 2.2. I turned on remote debugging for VS2013 in the management portal. I c
I also struggled with this (VS2015 Enterprise) but found a solution that works pretty consistently.
This works for me almost every time. Note that stopping and starting the web app from w/in Visual Studio does not work consistently.
I was having this problem with a .Net Core Azure Function project. The following github issue speaks to it, but solution didn't solve my problem:
https://github.com/Azure/Azure-Functions/issues/872
I finally stumbled across the answer here:
http://dontcodetired.com/blog/post/Remote-Debugging-Azure-Functions-V2-The-breakpoint-will-not-currently-be-hit-No-symbols-have-been-loaded-for-this-document
It boils down to manually attaching to the process in Azure, rather than relying on the Cloud Explorer right-click functionality.
I ran into this issue a few times.
I got it fixed by making sure the platform/configuration of my publish profile matched my local build platform/configuration.
I was publishing Debug | Any CPU, but my local build was using Debug | Mixed Platforms.
Once I changed my publish configuration to Debug | Mixed Platforms and republished, I was able to attach the remote debugger and the symbols were loaded.
Verify the symbols are loaded for the assembly you are attempting to set breakpoints in by looking in the Visual Studio 'Modules' window for the namespace/assembly name. (This is after attaching the debugger to the remote process and your VS is in Debug mode.)
After I did this, breakpoints began working for the remote process from within my local VS instance.
Make sure you publish a debug build to a specific deployment slot. I had this same problem and when I attached the remote debugger to my staging slot that had a debug build deployed there, it worked. Trying to debug a release build doesn't work because the requisite debug symbols are not present. Like @Lars explains above, I had to restart the web app on Azure and then try the debug again against the debug build.
After struggling with this for hours, I found a consistent solution. I think the root cause is simply a confusing UI. Try this:
I wrote a short article what helped me with debugging. Have a look here: Debugging in Azure Cloud
In a nutshell: Find the correct processes to attach to for worker role and web role. WebRole: WaIISHost.exe, w3wp.exe + conhost(s) WorkerRole: WaWorkerHost.exe + conhost(s)