Debugging

Some of the most exciting features of any IDE are the debugging features. To take advantage of these features, you must make sure that you built your executable using a Debug configuration. There are two ways to enter the debugger:

  • Just-in-Time Debugging: You run as normal, and if an exception occurs, you will be allowed to enter the debugger. The program has crashed, so you will not be able to run any further. But you will be able to see the value of variables, and you will see the point at which the program failed.

  • Standard Debugging: You start the program under the debugger. You may set breakpoints, single step, and so on.

To experiment with the debugger, add the following two lines to your program after the calculation of gigabytes: ...

Get Application Development Using Visual Basic® and .NET now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.