Visual Basic Concepts

Using Break on Error in Components

See Also

You can change the way Visual Basic enters break mode when an error occurs in your component by setting the Error Trapping option in your component project.

In your component project, choose Options from the Tools menu to open the Options dialog box, and select the General tab. There are three options in the Default Error Trapping State box, as described below.

Note   The setting in the Default Error Trapping State box controls the default setting of the option when you start Visual Basic; it also toggles the option in the current session. If you wish to change the setting for the current session only, without affecting the default, select Toggle from the code window context menu.

Suppose you have a component that provides a Widget object that has a Spin method. The following descriptions assume that the test application has called the Spin method of the Widget object, and that an error has occurred in the Spin method’s code.

For More Information   See "Debugging Your Code and Handling Errors" in the Visual Basic Programmer’s Guide.