Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Microsoft

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

Microsoft via Microsoft Learn

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
  • Module 1: This module examines code validation using a combination of testing, debugging, and exception handling. The debugging process and benefits provided by code debugger are reviewed, along with the principals and processes behind exception handling.
    • Review the responsibilities for software testing, debugging, and exception handling.
    • Examine the code debugging process and the benefits provided by code debugger tools.
    • Examine what an exception is and the options for managing exceptions in your code.
  • Module 2: This module explores the tools and processes used to debug C# console applications in Visual Studio Code. Hands-on activities provide experience using breakpoints, conditional breakpoints, and the debugging resources in the RUN AND DEBUG view.
    • Configure the Visual Studio Code debugger for a C# program.
    • Create breakpoints and step through your code to isolate issues.
    • Inspect your program state at any execution step.
    • Use the call stack to find the source of an exception.
  • Module 3: This module explores the use of exceptions and the exception handling process in C# console applications. Hands-on activities provide experience implementing exception handling patterns for various coding scenarios.
    • Examine the basic categories of exceptions and review some common system exceptions.
    • Examine the exception handling tools included with C# and techniques for using these tools.
    • Implement the try-catch pattern within various coding scenarios.
  • Module 4: This module explores the process for creating, throwing, and catching customized exceptions in a C# console application. Hands-on activities provide experience customizing exception properties, throwing exceptions, and using the exception properties to mitigate the exception within a catch block.
    • Learn how exception objects are created and how to customize their property settings.
    • Develop C# console applications that create and throw customized exception objects.
    • Develop C# console applications that catch custom exception objects and manage exception property information.
  • Module 5: This module guides you through the code verification process for a C# console application. Hands-on activities provide experience identifying logic issues, debugging the application, and implementing exception handling. Step-by-step instructions are provided.
    • Use the Visual Studio Code debugger tools to identify and correct an issue in your code logic.
    • Implement exception handling in a C# console application using the try-catch pattern.
    • Create and throw exceptions with customized properties.
    • Catch exceptions at a lower level in the call stack.
  • Module 6: This module helps you evaluate your debugging skills. You start with a C# console application that contains code logic issues and a specification that describes the requirements. You’re challenged to demonstrate your ability to identify and fix the issues using the Visual Studio Code debugger tools.
    • Demonstrate your ability to use the Visual Studio Code debugger tools to identify and correct an issue in your code logic.

Syllabus

  • Module 1: Module 1: Review the principles of code debugging and exception handling
    • Introduction
    • Get started with testing, debugging, and exception handling
    • Examine the code debugger approach to debugging code
    • Examine exceptions and how exceptions are used
    • Knowledge check
    • Summary
  • Module 2: Module 2: Implement the Visual Studio Code debugging tools for C#
    • Introduction
    • Examine the Visual Studio Code debugger interface
    • Exercise - Run code in the debug environment
    • Examine breakpoint configuration options
    • Exercise - Set breakpoints
    • Examine the launch configurations file
    • Configure conditional breakpoints in C#
    • Exercise - Monitor variables and execution flow
    • Exercise - Complete a challenge activity using the debugger
    • Review the solution for the code debugger challenge
    • Knowledge check
    • Summary
  • Module 3: Module 3: Implement exception handling in C# console applications
    • Introduction
    • Examine exceptions and the exception handling process
    • Examine compiler-generated exceptions
    • Exercise - Implement try-catch exception handling
    • Exercise - Complete a challenge activity for try-catch
    • Review the solution for the try-catch challenge
    • Exercise - Catch specific exception types
    • Exercise - Complete a challenge activity to catch specific exceptions
    • Review the solution for the catch specific exceptions challenge
    • Knowledge check
    • Summary
  • Module 4: Module 4: Create and throw exceptions in C# console applications
    • Introduction
    • Examine how to create and throw exceptions in C#
    • Exercise - Create and throw an exception
    • Exercise - Complete a challenge activity for creating and throwing exceptions
    • Review the solution for the create and throw exceptions challenge
    • Knowledge check
    • Summary
  • Module 5: Module 5: Guided project - Debug and handle exceptions in a C# console application using Visual Studio Code
    • Introduction
    • Prepare
    • Exercise - Review and test a C# console application using sample data
    • Exercise - Throw and catch exceptions in a C# console application
    • Knowledge check
    • Summary
  • Module 6: Module 6: Challenge project - Debug a C# console application using Visual Studio Code
    • Introduction
    • Prepare
    • Exercise - Use the test data to expose logic issues in a C# console application
    • Exercise - Use the Visual Studio Code debugger to isolate and fix logic issues in a C# console application
    • Knowledge check
    • Summary

Reviews

Start your review of Debug C# console applications (Get started with C#, Part 6)

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.