What Went Wrong? Finding and Fixing Errors Through Debugging
When you write a computer program, errors can and will occur. You might make a typographical error, your program might not behave as expected, or it might not run at all. When there is an error in your program, you have to find it and fix it. Finding and fixing errors is called debugging.
In the following lessons, you will learn several techniques for debugging a Visual Basic program.
In This Section
Finding the Errors: Introduction to Visual Basic Debugging
Describes how to debug a program and fix errors.Know Your Bugs: Three Kinds of Programming Errors
Describes three kinds of errors that can occur in a program: compilation, run-time, and logic errors.Finding and Getting Rid of Compiler Errors
Describes how to find and fix compiler errors in a program by using the Error List window and IntelliSense.It Doesn't Work! Finding and Eliminating Run-Time Errors
Describes how to debug a program and fix run-time errors by using the Exception Assistant dialog box and IntelliSense.What? It Wasn't Supposed To Do That! Finding Logic Errors
Describes how to find logic errors by setting breakpoints and stepping through code.Making Notes in Your Programs: Using Comments
Describes how to create comments in the code for a program and how to use comments for debugging.
Related Sections
Closer Look: What If... Testing Code in the Immediate Window
Explains how to evaluate and run code by using the Immediate window.Another Bug: Something Is Still Wrong
Explains how to find and fix a logic error that caused unexpected behavior.Creating the Visual Look of Your Program: Introduction to Windows Forms
Explains how to use forms and controls to create a user interface.Visual Basic Guided Tour
The Visual Basic Guided Tour is a series of sequential lessons that will introduce you to the basics of programming in Visual Basic.