A script-enabled browser is required for this page to function properly.

PL/SQL Trigger dialog box

The PL/SQL Trigger dialog box is displayed when you right-click in the PL/SQL Interpreter's Source pane, and choose Trigger, or when you choose Programright arrowDebugging Triggers. This dialog box enables you to create a debug trigger, and provides a graphical user interface for the Interpreter's TRIGGER command.

This dialog box contains:
 

 

Trigger

Identifies the debug trigger and is of the form Trigger: New or Trigger: number. The label value is New when specifying a new debug trigger, or a number when modifying an existing debug trigger. 

Enabled

Indicates whether the debug trigger is enabled or disabled.

Location

Specifies the source location of the debug trigger.

  • The Program Unit option (the default) indicates the debug trigger is located at a specific source location in a program unit.

  • The Debug Entry option indicates the trigger is fired as soon as program unit execution is suspended.

  • The Every Statement option indicates the debug trigger is fired just prior to every executable statement in the program unit.

Program Unit

Identifies the target program unit.

Line

Identifies the source location of the debug trigger in the program unit.

Trigger Body

Type the PL/SQL statements to be used as the body of the debug trigger. BEGIN and END keywords are not required.

A debug trigger works like a conditional break trigger. If you specify conditions for when a debug action should take place, the trigger is fired only if the conditions are true.

For example, you can raise DEBUG.BREAK if a variable is equal to a certain value, such as 100:

IF DEBUG.GETC('vnumber') = 100 THEN
RAISE DEBUG.BREAK;
END IF;