Is there a way that I can trace every method, basically a line trace, in an asp.net web site in production environment?
I don't want to go about creating db logging for every line - i see an intermittent error and would like to see开发者_如何学C every line called and performed by the website per user.
You can turn on ASP.Net Tracing ( Also Here ) to trace the basic event flow. Then use Trace.Write() to write your own trace markers.
You can also use the very popular Elmah project to track down those hard to find errors.
Set up a Trace for every method, and within each method, so you can grab the general area that the bug is occurring in. Then you can add more Traces in the identified area until you pinpoint the problem.
Then when everything's fixed, just turn tracing off in the Config and it's all good to go. (and then if you have another issue later, just turn tracing back on and you've already half solved the problem.)
精彩评论