Search code examples
debuggingazureazure-worker-roles

When locally debugging an Azure Service what process do I attach to?


I have followed a tutorial to attach my debugger in visual studio so i can debug my Worker Role I have deployed.

I can confirm the Worker Role is running and I have connected to it in code with a TcpClient. Now when trying to debug I open my Server Explorer and expand my nodes under Cloud Services until I get to my worker role and the Instance0 (my only instance). When I right click and attach debugger I get a pop up to select a process to attach to...

The tutorial I've been looking at doesn't mention this pop up, so maybe it is unique to me for some reason. Another stack overflow mentioned attaching to the w3wp, but I don't have that process on my list!


Solution

  • Your Worker Role code is running in WaWorkerHost.exe. The w3wp comment you found is for a Web Role. See also http://blogs.msdn.com/b/kwill/archive/2011/05/05/windows-azure-role-architecture.aspx for an explanation of the different processes in an Azure VM.