From the course: Visual Basic Essential Training

Unlock this course with a free trial

Join today to access over 24,500 courses taught by industry experts.

Run the example code with a debugger

Run the example code with a debugger - Visual Basic Tutorial

From the course: Visual Basic Essential Training

Run the example code with a debugger

- [Instructor] Having bugs in code is annoying, but it happens to every developer. Being able to examine the code while the application is running is useful. Visual Studio provides a debugger and a lot of debugging services to help us. Let's look at how to debug this project. I did put this Console.ReadLine code back in the editor. To debug an application, I would go to the Debug menu and choose Start Debugging. I can also press F5. For people who like clicking on buttons, I can also click on this button that says Simple Console. This will debug the current selected project, which in my case is Simple Console. So let's do that. The application pops up, I see today is Sunday. I see the blinking cursor, I press Enter. I get the opportunity to examine my code before I close the window. So far that didn't look any different from running without debugging. I have to have a break breakpoint in my code to really take advantage of this. So let's put a breakpoint here on line eight. So I'll…

Contents