The debugger writes exception messages to the Output window. You can choose whether or not the program should halt or continue processing.
For Stop If Not Handled, the debugger writes a message to the Output window when an exception occurs, but does not halt the program unless the exception handler fails to handle the exception. At that point it is too late to fix the problem or examine the source code to see where the exception occurred because the program is already past the point where the exception occurred and is executing in the exception handler.
For Stop Always, the debugger stops the program and notifies you immediately when an exception occurs, before any handler code is invoked. You can look at the source window to see where the exception occurred, use the Watch and Variables windows and QuickWatch to see variable contents, and attempt to fix the exception yourself by modifying the variable contents. When you continue the program after the exception, a dialog box asks if you want to pass the exception back to the program’s exception handlers. If you fixed the problem, click No. Otherwise, click Yes, and the exception handler is invoked. If the exception handler cannot fix the problem, the debugger halts the program and notifies you as if the exception were Stop If Not Handled.
To set how the debugger handles exceptions
The Exceptions dialog box opens.
The Exceptions list box in the Exceptions dialog box contains a default list of system exceptions. The information is saved in the project.DSW file, which persists with the project. If an exception is not included in this list, the debugger treats it as a Stop If Not Handled exception.
To add a new exception to the Exceptions list box
The Exceptions dialog box appears.
To change an exception parameter
The Exceptions dialog box appears.
To remove an exception from the Exceptions list box
The Exceptions dialog box appears.
When you delete an exception from the Exceptions list box, its action reverts to Stop If Not Handled.
To restore all default system exceptions to the Exceptions list box
The Exceptions dialog box appears.
All default system exceptions are restored to the Exceptions list box without disturbing any of the user-defined exceptions that have been added.