Another type of breakpoint you can use is the break on exception. You can choose to break on all exceptions or on a group of frequently used system exceptions (e.g., NO_DATA_FOUND and VALUE_ERROR).
When you choose to run your module in debug mode with break on exceptions, execution is suspended upon reaching a line of code that causes an exception.
Suppose you have chosen to break on the system exception VALUE_ERROR. Consider the following code when it is run in debug mode; execution would be suspended upon reaching line 5, where the 1-character length variable 'a' is assigned a 6-character value.
PROCEDURE do_value_error IS
a varchar2(1);
BEGIN
-- Cause value_error exception
a := 'toobig';
EXCEPTION
WHEN VALUE_ERROR THEN
do_message('VALUE_ERROR exception occurred);
END;
Like breakpoints, you can set break on exceptions before you run the module, as well as while the module is running or suspended. Break on exceptions set during a Builder session are not lost when you stop debugging (without exiting the Builder). However, they are not saved when you terminate the Builder session.
About Breakpoints and Executable Source Lines
About the Current Execution Location and Current Stack Frame