简体   繁体   中英

Trace from aspx.cs file

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.

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!")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM