Introduction

Completed

Edsger Dijkstra once said:

"If debugging is the process of removing bugs, then programming must be the process of putting them in."

In this module, you'll learn how to effectively debug .NET programs. The faster you can find and identify bugs, the faster you can get your code to a working state. You'll spend less time scratching your head wondering why your code worked five seconds ago but doesn't work now.

Learning objectives

By the end of this module, you'll be able to:

  • Use the Visual Studio Code debugger with a .NET program.
  • Create breakpoints and run your code step by step to find issues.
  • Inspect your program state at any execution step.
  • Rewind the call stack to find the source of an exception.

Ultimately, you'll be able to find bugs effectively in your .NET programs, and you won't need to rely only on Console.WriteLine anymore.

Prerequisites

Local installations of .NET SDK, Visual Studio Code, and the C# extension for Visual Studio Code.