When you are working in the development of your application, you will normally encounter unexpected problems due to logical or runtime errors, even if the application is being tested or in production and you want to monitor the health of an application or to gather the extra information that you need to identify errors or bugs. To take care of such problems or identify and fix such errors or monitor an application’s health, C# and Microsoft Visual Studio helps us out in this case to provide classes and tools for debugging and diagnostics.
In this chapter, ...