Remote Debugging On Azure
February 26, 2013 Leave a comment
I decided that I needed to learn a bit about remote debugging on Azure. I know that you are supposed to use the Azure emulator to hash out your problems before hand, but I still would like the ability to debug remotely in case the need comes up.
I Googled on Bing how to do it and I ran across this article that seems to be a good place to start. It looks like I need to upload the VS2010 remote tools to Azure as a necessary but not sufficient step. The thing is, I have no idea how to do that. Do I upload the tools only once to my azure account? Is it site && project specific? I don’t know and Binging on Google doesn’t seem to help.
I then looked at this article but it assumes that I am using a Virtual Machine and installing the MSVSMON.exe to the VM. If that was the case, I would just install VS2010 to the VM and debug there. So that article is of no help.
I am stuck on this line of the 1st article: “You can find the tools on Microsoft Download Center here, and then upload to your storage account using whatever Windows Azure Storage account tool of your choice. “ Going over to my Azure account, I see a “Storage” section.
So I create a new storage like so:
The illogical meter is running high. Why should I need to install Data Services to install MSVSMON? I can do Computer-> Cloud Service, but that us the same as creating a Cloud Service.
I decided to work in the other direction. I created a new Azure hosted WCF Service in VS2010 like so:
and after the default template of this:
I changed Service1 name and then added a single method that returns the sum of two numbers:
public class AddingMachine : IAddingMachine { public Int32 Add(Int32 number1, Int32 number2) { return number1 + number2; } }
I then deployed his to the Azure server via Visual Studio – 1st I set up the deployment parameters
Then I added a certificate
And during the deployment I got this:
After a couple of minutes, I got the site up on Azure:
Which I assume might be the way to remote debug? I then hit myself in the head that the Build Configuration is Release (the default) and not debug and I need the debug symbols to remote debug. I deployed again and then I opened attach to process in Visual Studio:
I then pumped in the name of the site:
Doh!
Time to go to Brian Hitney’s office hours!