Search code examples
azureremote-debuggingazure-worker-roles

Azure Service Debugging hangs on attach to process how can I trouble shoot this?


I'm trying to debug a deployed Azure Worker Role. I have the service published from visual studio and confirmed it is running on my Azure dashboard. In visual studio I right click the Instance of the role (only 1 is there) and select debug. After 5+ minutes I get the process dialog box and I select the WaWorkerHost.exe process. After that nothing is happening - I have a visual studio dialog that says "A remote operation is taking longer than expected". It has been 25 minutes so far.

1) I need to be able to debug my service and I'd like to do it vs the Azure published version. How can I debug this hanging operation?

2) 30+ minutes is not reasonable to wait for a debugger to attach. Is there any way to improve the process?


Solution

  • To be able to debug your Azure cloud service, you first need to make sure it is built with the Debug configuration and that the remote debugger feature is enabled, then you'll be able to attach to the role from Visual Studio as if you were running it locally.

    You can follow these steps to enable the debugger and attach to the service: https://azure.microsoft.com/en-us/documentation/articles/vs-azure-tools-debug-cloud-services-virtual-machines/