11
1 VB.Net Simple Debugging

Simple debugging

Embed Size (px)

Citation preview

Page 1: Simple debugging

1

VB.Net

Simple Debugging

Page 2: Simple debugging

22

Remember! Work on the desktop

A project folder is created with a new project. Always copy this whole directory – don’t open it up and take bits of it. All the files are needed by VB.Net

Page 3: Simple debugging

33

Copy the WHOLE directory to the desktop to work on it

Page 4: Simple debugging

44

Work on your projectRun the version on the desktop by either opening the folder and double-clicking the solution file

Or opening VB and finding the file

Page 5: Simple debugging

55

Using the Debugger 1

Click the green triangle to compile and debug

Never click Yes (it will run the last build).

Click No – you need to sort out those bugs!

Page 6: Simple debugging

66

Double-click the errors and the compiler will show you the line where the problem is.

Page 7: Simple debugging

77

Break Points

Set a break point by clicking on the grey bar on the left hand side of the window.

When you debug the compiler will

stop and show

you the status

of the programat that point

Page 8: Simple debugging

88

Step through

Use F11 to go to the next statement

The Autos window will show you the current value of a variable …

… as will putting your mouse over the name of a variable

Page 9: Simple debugging

99

Step Into (F8) & Step Over (Shift F8)

Use Debug - Step Into (F8) to step through the whole program

You can

Step Into or Step Over subroutines

Hit F5 to run program to end

Page 10: Simple debugging

1010

“Watch” your variables

Right click on your variable and select “Add Watch” to monitor the value of your variables in the Watch window

Page 11: Simple debugging

1111

At the end of the session

Copy the whole project back – select “Yes to All” when asked