In this video, we’ll start by answering the simple question, What is debugging? We’ll also introduce the project that we will be using throughout this workshop.
[SOUND] Although no one likes to admit it, we all know that 0:00 when we're writing code, we're also introducing bugs. 0:04 Some bugs can be resolved simply by looking up the relevant code and 0:10 making a quick change. 0:13 However, most bugs are usually more complex and difficult to locate. 0:15 That's where debugging comes in. 0:19 So, what is debugging? 0:21 I think Wikipedia describes it best. 0:23 Debugging is the process of finding and resolving defects that prevent 0:25 correct operation of computer software or a system. 0:30 In this workshop, we'll take a look at how to debug an application 0:34 using the powerful Visual Studio ID from Microsoft. 0:37 Before we dive in, let's take a quick look at the application we'll be using for 0:41 this workshop, called SongList. 0:45 SongList is a simple console application for users to list their favorite songs. 0:48 The main method entry point is located in program.cs. 0:53 It's responsible for managing application state, 0:56 getting user options, and displaying the list of songs the user has added. 1:00 Song.cs is a simple song model. 1:03 Menu.cs and CLI.cs contain static methods for 1:06 displaying text and prompting for input from the user. 1:12 When running the app, we'll see a menu with three options. 1:15 Add song, view list, and quit. 1:19 First, let's add a new song using option one. 1:23 I'll enter Learning to Fly. 1:28 By Tom Petty. 1:33 Then we're asked if we'd like to add another song. 1:36 I'll type n for no. 1:39 And we're back to the option menu. 1:41 Let's confirm our song has been added to the list by using option two. 1:43 There it is. 1:48 This is a very simple application. 1:51 So it doesn't persist our songs when we exit the app. 1:53 But this is all we need to learn about debugging in Visual Studio. 1:57 So let's get started. 2:00
You need to sign up for Treehouse in order to download course files.Sign up