When debugging an ASP.NET application, you need to find out how the code is being executed and track its execution sequence. This is where tracing can help you. Using tracing, you can trace the flow of execution and how various events are happening in your ASP.NET Web API.
You can use the default trace writer in the Web API or you can create your own. This article will discuss both approaches and how it can be used to your advantage.
ASP.NET Web API has its own default tracing that can be used by just enabling it. Â You’ll be using the SystemDiagnosticsTraceWriter class as the trace writer. If you create your own, it will be a different approach.
Read the rest of tutorial in this post:Â http://www.codeguru.com/csharp/.net/using-tracing-in-asp.net-web-api.htm