Debug C# console applications (Get started with C#, Part 6)

Beginner
Developer
Higher Education Educator
K-12 Educator
Student
.NET
Visual Studio Code

Learn how to debug C# console applications in Visual Studio Code and how to implement exception handling using the try-catch pattern. Configure the C# debugger tools in Visual Studio Code and use the debugger tools to isolate and fix logic issues. Examine the exception types provided by .NET and the properties of exception objects, then implement exception handling and throw customized exception objects.

Screenshot of the trophy for the Debug C# console applications (Get started with C#, Part 6) learning path.

Debug C# console applications (Get started with C#, Part 6)

Prerequisites

  • An installation of Visual Studio Code that's configured for C# application development.
  • Ability to develop C# console applications that implement business logic using iteration statements, selection statements, and custom methods.

Modules in this learning path

Examine the code debugging process and the benefits provided by code debuggers, and learn what an exception is and how exceptions are used in an application.

Learn how to effectively debug C# programs in Visual Studio Code using breakpoints and the other debugging tools, such as resources in the RUN AND DEBUG view.

Learn about exceptions, the exception handling process supported by C#, and then implement exception handling patterns for various coding scenarios.

Learn how to create exception objects, how to customize the properties of an exception object, and the process for creating, throwing, and catching custom exception objects in a C# application.

This module guides you through a code review and debugging process, as well as the process for adding exception handling to an application.

In this module, you'll run an application to identify logic issues and then use the Visual Studio Code debugger tools to isolate and fix the issue.