In previous sections of this chapter, we learned how to debug WCF services, but the services are all hosted on an on-premise computer. Now, in the last section of this chapter, we will learn how to debug the WCF service, HelloWorldCloud
, that we have deployed to the cloud in the last chapter. We will enable the debugging of the service, attach a debugger to the service process, and debug it using Visual Studio on our local computer.
To debug a cloud service from a remote machine, debugging functionality must be enabled explicitly when the service is deployed to the cloud. When debugging is enabled for a cloud service, required services (msvsmon.exe
, for example) will be installed on the virtual machines that run the role instances. As we didn't enable remote debugging when we published the HelloWorld
service to the cloud, we have to republish the service with remote debugging enabled.