Question

How can I trace from the client side of a ASP.NET web application ? I'm trapped in a aspx.cs file and I really need some fast simple debugging. I tried System.Diagnostics.Trace.WriteLine without success: nothing appeared in DebugViewer when I refreshed the page in browser.

Thanks!

Edit: Adding the Trace attribute to the page Directive in my aspx file did trace Trace.Write, but I don't want all the other bulk trace (some hundred lines)

Edit 2: I'm not using Visual Studio and I don't want it if only for tracing.

Was it helpful?

Solution

You have a couple of options

Here's a link to the MSDN article How to: Enable Tracing for an ASP.NET Application

You can view trace info by going to http://localhost:<portnumber>/trace.axd

If you're using Visual Studio you can use:

System.Diagnostics.Debug.WriteLine("This appears in the output window!")
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top