WindowsDevCenter.com
oreilly.comSafari Books Online.Conferences.

advertisement


AddThis Social Bookmark Button

What Is ASP.NET
Pages: 1, 2, 3, 4, 5, 6, 7, 8

Tracing and Debugging

In the previous example, I mentioned that you can view the Web Form in either Design view or Code-Behind view. Visual Studio supports yet another view: Source view. Using Source view, you can view the source of a page (the markup elements that make up the UI of a page). Figure 5 shows the Source view of the previous example:

Figure 5
Figure 5. Switching to Source view

One useful feature in ASP.NET is the enhanced support for tracing and debugging. You can trace the flow of your application by using the Trace attribute in the <Page> directive:


<%@ Page Language="VB" Trace="true" 
   AutoEventWireup="false" CodeFile="Default.aspx.vb" 
   Inherits="_Default" %>

When you enable tracing, you will see output similar to that shown in Figure 6. You would be able to examine detailed execution information such as the sequence in which the events are fired, as well as the values of the environment variables, and so on.

Figure 6
Figure 6. Enabling tracing for your ASP.NET application

Pages: 1, 2, 3, 4, 5, 6, 7, 8

Next Pagearrow