VB.Net


Simple Debugging



                   1
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
                                                            2
Copy the WHOLE directory to the desktop to work on it


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




                                             4
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!




                                                 5
Double-click the errors and the compiler will show you the
line where the problem is.
                                                             6
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 program
at that point



                                                7
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


                              8
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

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



                               10
At the end of the session




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

Simple debugging

  • 1.
  • 2.
    Remember! Work onthe 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 2
  • 3.
    Copy the WHOLEdirectory to the desktop to work on it 3
  • 4.
    Work on yourproject Run the version on the desktop by either opening the folder and double-clicking the solution file 4
  • 5.
    Using the Debugger1 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! 5
  • 6.
    Double-click the errorsand the compiler will show you the line where the problem is. 6
  • 7.
    Break Points Set abreak 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 program at that point 7
  • 8.
    Step through Use F11to 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 8
  • 9.
    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 9
  • 10.
    “Watch” your variables Rightclick on your variable and select “Add Watch” to monitor the value of your variables in the Watch window 10
  • 11.
    At the endof the session Copy the whole project back – select “Yes to All” when asked 11