Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright Ó Oracle Corporation, 1999. All rights reserved. 1414 Debugging Triggers.

Similar presentations


Presentation on theme: "Copyright Ó Oracle Corporation, 1999. All rights reserved. 1414 Debugging Triggers."— Presentation transcript:

1 Copyright Ó Oracle Corporation, 1999. All rights reserved. 1414 Debugging Triggers

2 14-2 Copyright Ó Oracle Corporation, 1999. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Describe the components of the Debugger Run a form module in debug mode Debug PL/SQL code After completing this lesson, you should be able to do the following: Describe the components of the Debugger Run a form module in debug mode Debug PL/SQL code

3 14-3 Copyright Ó Oracle Corporation, 1999. All rights reserved. Debugging Triggers Monitor and debug triggers by: Compiling correct errors in the PL/SQL Editor Displaying debug messages at run time Invoking the PL/SQL Debugger Monitor and debug triggers by: Compiling correct errors in the PL/SQL Editor Displaying debug messages at run time Invoking the PL/SQL Debugger

4 14-4 Copyright Ó Oracle Corporation, 1999. All rights reserved. Debugging Tips Connect to the database for SQL compilation. The line that fails is not always responsible. Watch for missing semicolons and quotation marks. Define triggers at the correct level. Place triggers where the event will happen. Connect to the database for SQL compilation. The line that fails is not always responsible. Watch for missing semicolons and quotation marks. Define triggers at the correct level. Place triggers where the event will happen.

5 14-5 Copyright Ó Oracle Corporation, 1999. All rights reserved. Running a Form in Debug Mode Run Form Debug Contains source code and executable runfile.FMX (Compiles automatically) (Runs automatically) Run Form in Debug Mode

6 14-6 Copyright Ó Oracle Corporation, 1999. All rights reserved. PL/SQL Debugger 1 2 3 4

7 14-7 Copyright Ó Oracle Corporation, 1999. All rights reserved. PL/SQL Debugger 6789105

8 14-8 Copyright Ó Oracle Corporation, 1999. All rights reserved. Invoking the Debugger and Breakpoints DebugMode 1 2 FormStartup

9 14-9 Copyright Ó Oracle Corporation, 1999. All rights reserved. Breakpoint and Debug Triggers EveryStatement Debugger Program Unit Statement Debug trigger Breakpoint trigger Fire Breakpoint

10 14-10 Copyright Ó Oracle Corporation, 1999. All rights reserved. Debug Triggers

11 14-11 Copyright Ó Oracle Corporation, 1999. All rights reserved. Debug Commands Step over Stepout Reset GO 1 2 Stepinto

12 14-12 Copyright Ó Oracle Corporation, 1999. All rights reserved. Debug Example …calls... The results are: ?? WHEN-BUTTON-DEPRESSED 1 Procedure XYZ; Function ABC; 2 3 4 5

13 14-13 Copyright Ó Oracle Corporation, 1999. All rights reserved. Debugger: Setting a Breakpoint

14 14-14 Copyright Ó Oracle Corporation, 1999. All rights reserved. Debugger: Stepping into Code

15 14-15 Copyright Ó Oracle Corporation, 1999. All rights reserved. Debugger: Checking Variables

16 14-16 Copyright Ó Oracle Corporation, 1999. All rights reserved. Corrected Code FUNCTION abc (abc_param IN NUMBER) RETURN NUMBER IS v_total NUMBER := 0; v_num3 NUMBER := 3; v_num6 NUMBER := 6; /*-- changed value to 6 */ BEGIN v_total := v_num3 * v_num6; v_total := v_total + abc_param; RETURN v_total; END abc; FUNCTION abc (abc_param IN NUMBER) RETURN NUMBER IS v_total NUMBER := 0; v_num3 NUMBER := 3; v_num6 NUMBER := 6; /*-- changed value to 6 */ BEGIN v_total := v_num3 * v_num6; v_total := v_total + abc_param; RETURN v_total; END abc;

17 14-17 Copyright Ó Oracle Corporation, 1999. All rights reserved. Summary To debug a form: Use the Run Form Debug button, and set breakpoints. Debug commands can be entered in the Interpreter pane or by using buttons. Set breakpoints to invoke the Debugger. Break and Debug triggers are available to program Debug Actions on events in the form. To debug a form: Use the Run Form Debug button, and set breakpoints. Debug commands can be entered in the Interpreter pane or by using buttons. Set breakpoints to invoke the Debugger. Break and Debug triggers are available to program Debug Actions on events in the form.

18 14-18 Copyright Ó Oracle Corporation, 1999. All rights reserved. Practice 14 Overview This practice covers using the Debugger to help solve problems at run time.


Download ppt "Copyright Ó Oracle Corporation, 1999. All rights reserved. 1414 Debugging Triggers."

Similar presentations


Ads by Google