simple debugging

Post on 26-May-2015

3.608 Views

Category:

Documents

4 Downloads

Preview:

Click to see full reader

TRANSCRIPT

1

Simple Debugging

VB.Net

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

33

Copy the WHOLE directory to the desktop to work on it

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

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!

66

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

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

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

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

1010

“Watch” your variables

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

1111

At the end of the session

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

top related