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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.