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.

Step through the code while debugging

Step through the code while debugging - Visual Basic Tutorial

From the course: Visual Basic Essential Training

Step through the code while debugging

- [Instructor] Once you have your breakpoints in your code, you'll want to step through the code, and observe the behavior of the application. This video shows how to effectively navigate code while debugging. Now this is some code from earlier in the course. When I click on the step button, it's running the get odd random number code. And if you recall, there is several method calls that are being called one after the other to produce this result. So we'll use this example to step through the code. Now here's the code. I'm declaring two variables I'm calling, get random odd number, and then I'm showing it on the screen. I want to put a breakpoint here on line 29. Then I'll go ahead and debug the application. I'm sitting at my breakpoint ready to run this line of code. Now as you could see, this line of code calls a function. So we're going to talk about how this works. First of all, let me drag this yellow arrow back up to the top, and then I want to show you this continue. If I…

Contents