Debugging with VS2008 at the Dallas ASP.NET UG
Some time back, I gave a talk at the Dallas ASP.NET User Group on the topic of "Debugging with Visual Studio 2008". In case anyone can find the notes, slides, and demos useful, they are located at http://www.dallasasp.net/Meetings/238.aspx. Some things have changed since Silverlight has gone RTW (Released To Web/World).
At the meeting, we discussed ways to think like an efficient debugging developer and then we walked through the demos to see it in action. We walked performed some debugging actions and looked at a few things that a typical debugging session doesn't encounter. We looked at the rarely used attributes that are good for debugging, IE Developer toolbar, and Firefox's FireBug.
I will repeat some advice that I was given over 13 years ago. Anyone can work and produce but more valuable are people who solve problems. Now that's good debugging advice. This was one of my favorite talks and I hope the demos will be helpful to others. The demo concept entails a meeting RSVP system. The data is random based on the time but the numbers change just the same.
Demos:
RSVPSilverlightWeb: A simple ASP.NET web site with three example technologies: Standard ASP.NET AJAX, JSON, and a Silverlight control. We performed some debugging with the three components that are located on a single web page.
RSVPModule: An HTTP Module used in the website to display the page load time.
RSVPHandler: An HTTP Handler that will perform work for urls with the "RSVP" extension such as ShowDallasASPNetUG.rsvp. I noticed that the demo zip file does not have the extremely simple RSVP application that was deployed to my IIS. You can reproduce this extremely simple demo. It is an ASP.NET application with a simple default.aspx and nothing added. The web.config has one line added to to the httpHandlers node as shown below. This register the handler to call the handler for debugging.
<add verb="*" path="*.rsvp" type="RSVP.RSVPHandler" />
</httpHandlers>RSVPSilverlight: This is a Silverlight component that uses a web service file, WebServiceSilverlight.cs, in the RSVPSilverlightWeb website project. Beware - this was the beta2 version without considerations for cross-domain web service calls. To get it working properly with the RTW version, we follow the link at
http://msdn.microsoft.com/en-us/library/cc197955(VS.95).aspx and re-create the service reference in the Silverlight control.RSVPGadget: A Windows Vista Gadget using our existing WCF with JSON that is consumed on the RSVPSilverlightWeb page. The files that are in the RSVPGadget files are copied to a folder such as
"C:\Users\[user]\AppData\Local\Microsoft\Windows Sidebar\Gadgets\RSVP.gadget".
Resources:
The Ultimate Debugger (Tess Ferrandez)
Books
Debugging Strategies for .Net Developers
Apress - Darin DillonDebugging .NET 2.0 Applications
MSPress - John RobbinsStay Current on ASP.NET and Silverlight 2.0
Javascript Debugging
http://weblogs.asp.net/scottgu/archive/2007/07/19/vs-2008-javascript-debugging.aspx
Debugging ASP.NET AJAX Applications
Firebug: (Tutorial)
http://michaelsync.net/2007/09/08/firebug-tutorial-overview-of-firebug
Production Debugging
http://blogs.msdn.com/tom/archive/2008/07/15/debugging-asp-net-on-a-production-server-101.aspx
WinDbg + SOS
More on Vista Gadgets:
http://www.microsoft.com/technet/scriptcenter/topics/vista/gadgets-pt1.mspx
The Vista Gadget:
The Demo Web Page: