Understanding the options for debugging ASP.NET AJAX applications is an important part of enhancing an application’s overall performance and stability as well as maximizing developer productivity. In this chapter, you’ve seen how debug and release client-script versions can be loaded using the ScriptMode property of the ScriptManager control. You’ve also seen how to use ASP.NET AJAX Library classes such as Error and Sys.Debug. The Error class allows you to create specific types of Error objects, while the Sys.Debug class allows for tracing, JSON object viewing, assertions, and debugging.
Several options exist for debugging ASP.NET AJAX applications running in Internet Explorer and Firefox. Those running Visual Studio .NET 2005 (or Visual Web Developer Express) will find the debug-ger to be very functional once all scripts referenced in a page are opened using the Script Explorer. Those without access to Visual Studio .NET 2005 can leverage Microsoft’s Script Debugger or use the Firebug debugger with Firefox.
Testing ASP.NET AJAX applications may involve inspecting request and response messages to see if their size can be minimized by reducing ViewState or other data. Several tools exist for viewing request and response messages, such as Fiddler and the Web Development Helper. By using these tools, you can quickly see what data is being sent across the wire.