Chapter 5.  Debugging, Monitoring, and Testing

This chapter is about debugging tools, monitoring, diagnosing problems, and testing your code, to remove bugs and ensure high performance, stability, and reliability.

This chapter covers the following topics:

  • Debugging tools
  • Monitoring performance and resource usage
  • Unit testing an application

Debugging tools

In this section, you will learn how to debug problems at design time, trace problems at runtime, and use types such as Debug, Trace, Process, and Stopwatch that are in the System.Diagnostics namespace.

Debugging an application

For Visual Studio 2017, press Ctrl + Shift + N, or navigate to File | New | Project....

In the New Project dialog, from the Installed | Templates list, select Visual C#. In the ...

Get C# 7 and .NET Core: Modern Cross-Platform Development - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.