pallosp
asked on
Debugging with Trace.WriteLine
I'd like to debug a web page using Debug.WriteLine or Trace.WriteLine. Where do they output to? What should be added to web.config and the .aspx file? How should Visual Studio 2005 be configured?
My Default.aspx.cs is now
protected void Page_Load(object sender, EventArgs e)
{
System.Diagnostics.Trace.W rite("Hell o World!");
System.Diagnostics.Debug.W rite("Hell o World!");
}
After running Default.aspx on the integrated web server nothing is seen in the Output window except the build info.
My Default.aspx.cs is now
protected void Page_Load(object sender, EventArgs e)
{
System.Diagnostics.Trace.W
System.Diagnostics.Debug.W
}
After running Default.aspx on the integrated web server nothing is seen in the Output window except the build info.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
OK, I can see the text under the web page, but still nothing appears in the Output window. Setting pageOutput="true" doesn't help. Which Trace class is integrated with Visual Studio?
Setting pageOutput="true" doesn't help >> Setting pageOutput="true" appends trace messages to each page of aplication
Tracing is essentially a mechanism to monitor the performance of an Application.
Application-level tracing can be performed by enabling the same in web.config or machine.config file. A special page Trace.Axd is used to view trace information collected from all the pages in the application.
ASP.NET application executes in a seperate process aspnet_wp.exe . Perfmon tool can be used to monitor the performance of application.
Tracing is essentially a mechanism to monitor the performance of an Application.
Application-level tracing can be performed by enabling the same in web.config or machine.config file. A special page Trace.Axd is used to view trace information collected from all the pages in the application.
ASP.NET application executes in a seperate process aspnet_wp.exe . Perfmon tool can be used to monitor the performance of application.
ASKER
Do I think well that VS integrated trace/debug output is only supported by simple C# projects, and in ASP.NET projects I have to be satisfied with Trace.axd?
ASKER