Tuesday, January 13, 2009

How to debug Windows Azure on the Cloud?

Is it possible to debug an application running on the cloud?

The answer is NOT the conventional way. It is not possible to attach the debugger to the application running in the cloud as your application could be running on any number of VM's in the cloud.

Then how do I debug an application?

I remember the story said by Sriram Krishnan in the Microsoft PDC 2008 held in Seattle.

Some time back NASA launched Pathfinder to Mars. After Pathfinder landed in Mars, It kept sending the photos to earth. All of a sudden it stopped sending photos to earth!! Chief scientists in NASA broke their head to figure out what went wrong in their software! It's not feasible to bring Pathfinder back to earth, debug the software and resend it. Also, it's not possible to attach a debugger to the Pathfinder in the Mars. Only thing what helped them in fixing the issue was the Tracing which was fortunately turned on! Scientists analyzed the trace information and sent a patch update to Pathfinder to make it work!

Windows Azure cloud here is analogous to the Mars we can't download the cloud to local system nor attach a debugger to it. All we need to do is to have a log system in the application on the cloud and if something goes wrong analyze the logs, simulate it locally and re-deploy the software to the cloud.

You need not keep looking at the log all the time for an error. A Windows Azure alert helps you when there is an error.

How to debug Azure Storage locally?

Windows Azure CTP comes with the tools that fabricate the Azure Storage locally similar to the way running in the cloud.


No comments: