Tips and Tricks for Debugging ASP.NET Web Applications and Services Habib Heydarian TLNL05 Program Manager Microsoft Corporation
2 Tip 1: How do I Debug Client-Side Script? Client-side script Standalone script, e.g Admin.vbs wscript.exe Test.vbs //X (or //D) Script running in a Web Application Uncheck the “Disable Debugging” option in Internet Options Disable “pretty printing” in Internet Explorer Use the Script Explorer window in VS Demo
3 Tip 2: How do I Test my Web App using a Different Browser? Visual Studio always uses Internet Explorer when debugging an ASP.NET application To use other browsers: Register the browser in Visual Studio Set it as the “default” browser Demo
4 Tip 3: Debugging Web Services in Visual Studio 2005 You can debug an XML Web Service: On its own Called from a ASP.NET Web Form Called from a client application That is already running Demo
5 Tip 5: Using Visualizers for ASP.NET Debugging Data windows only show hierarchical view Not ideal for viewing complex types DataSetCacheXML Extend the debugger Write your own custom viewer using debugger Visualizers Demo
6 Resources Blogshttp://blogs.msdn.com/habibhhttp://blogs.msdn.com/scottnohttp://blogs.msdn.com/greggm Forums ( Visual Studio Debugger Forum
7 Tip 4: Debugging Legacy VB DLLs called from ASP.NET Cannot debug existing VB 6.0 DLLs in VS by default Additional setup required Need to manually attach to server process Demo
8 Tip 5: Remote ASP.NET Debugging Demo Remote Debugging Local MachineRemote Machine 1. Setup debug components on remote machine 2. Can either F5 or manually attach to the server process 3. Typically user needs to be admin
9 Tip 5: ASP.NET Production Debugging Visual Studio supports production debugging via: Dumps and NTSD extensions (SOS.dll) “Live” remote debugging Often, “live” remote debugging may not be suitable (possible) Need to capture dump and analyze offline Demo
10 Tip 8: Multi-Developer Debugging On Internet Information Server 6.0 With Internet Information Server 6.0 (IIS 6.0), multiple developers can debug on the same Web Server Three steps required: Create an application pool Configure the application pool Change the properties for the web application to use the new application pool Demo
© 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.