oracle forms lesson 15 debuging triggers
DESCRIPTION
Lesson 15 debuging triggersTRANSCRIPT
![Page 1: Oracle forms Lesson 15 debuging triggers](https://reader036.vdocuments.mx/reader036/viewer/2022082405/54531f77af7959c07f8b5c63/html5/thumbnails/1.jpg)
15Copyright © 2004, Oracle. All rights reserved.
Debugging Triggers
![Page 2: Oracle forms Lesson 15 debuging triggers](https://reader036.vdocuments.mx/reader036/viewer/2022082405/54531f77af7959c07f8b5c63/html5/thumbnails/2.jpg)
15-2 Copyright © 2004, Oracle. All rights reserved.
Objectives
After completing this lesson, you should be able to do the following:
• Describe the components of the Debug Console
• Use the Run Form Debug button to run a form module in debug mode
• Debug PL/SQL code
![Page 3: Oracle forms Lesson 15 debuging triggers](https://reader036.vdocuments.mx/reader036/viewer/2022082405/54531f77af7959c07f8b5c63/html5/thumbnails/3.jpg)
15-3 Copyright © 2004, Oracle. All rights reserved.
The Debugging Process
Monitor and debug triggers by:• Compiling and
correcting errors in the PL/SQL Editor
• Displaying debug messages at run time
• Invoking the PL/SQL Debugger
![Page 4: Oracle forms Lesson 15 debuging triggers](https://reader036.vdocuments.mx/reader036/viewer/2022082405/54531f77af7959c07f8b5c63/html5/thumbnails/4.jpg)
15-4 Copyright © 2004, Oracle. All rights reserved.
The Debug Console
• Stack
• Variables
• Watch
• Form Values
• PL/SQL Packages
• Global and System Variables
• Breakpoints
Dock/Undock
Click bar for Pop-upMenu
![Page 5: Oracle forms Lesson 15 debuging triggers](https://reader036.vdocuments.mx/reader036/viewer/2022082405/54531f77af7959c07f8b5c63/html5/thumbnails/5.jpg)
15-5 Copyright © 2004, Oracle. All rights reserved.
The Debug Console: Stack Panel
• Stack
• Variables
• Watch
• Form Values
• PL/SQL Packages
• Global and System Variables
• Breakpoints
![Page 6: Oracle forms Lesson 15 debuging triggers](https://reader036.vdocuments.mx/reader036/viewer/2022082405/54531f77af7959c07f8b5c63/html5/thumbnails/6.jpg)
15-6 Copyright © 2004, Oracle. All rights reserved.
The Debug Console: Variables Panel
• Stack
• Variables
• Watch
• Form Values
• PL/SQL Packages
• Global and System Variables
• Breakpoints
Read-only:
Modifiable:
![Page 7: Oracle forms Lesson 15 debuging triggers](https://reader036.vdocuments.mx/reader036/viewer/2022082405/54531f77af7959c07f8b5c63/html5/thumbnails/7.jpg)
15-7 Copyright © 2004, Oracle. All rights reserved.
The Debug Console: Watch Panel
• Stack
• Variables
• Watch
• Form Values
• PL/SQL Packages
• Global and System Variables
• Breakpoints
![Page 8: Oracle forms Lesson 15 debuging triggers](https://reader036.vdocuments.mx/reader036/viewer/2022082405/54531f77af7959c07f8b5c63/html5/thumbnails/8.jpg)
15-8 Copyright © 2004, Oracle. All rights reserved.
The Debug Console: Form Values Panel
• Stack
• Variables
• Watch
• Form Values
• PL/SQL Packages
• Global and System Variables
• Breakpoints
![Page 9: Oracle forms Lesson 15 debuging triggers](https://reader036.vdocuments.mx/reader036/viewer/2022082405/54531f77af7959c07f8b5c63/html5/thumbnails/9.jpg)
15-9 Copyright © 2004, Oracle. All rights reserved.
The Debug Console: PL/SQL Packages Panel
• Stack
• Variables
• Watch
• Form Values
• PL/SQL Packages
• Global and System Variables
• Breakpoints
![Page 10: Oracle forms Lesson 15 debuging triggers](https://reader036.vdocuments.mx/reader036/viewer/2022082405/54531f77af7959c07f8b5c63/html5/thumbnails/10.jpg)
15-10 Copyright © 2004, Oracle. All rights reserved.
The Debug Console: Global/System Variables Panel
• Stack
• Variables
• Watch
• Form Values
• Loaded PL/SQL Packages
• Global and System Variables
• Breakpoints
![Page 11: Oracle forms Lesson 15 debuging triggers](https://reader036.vdocuments.mx/reader036/viewer/2022082405/54531f77af7959c07f8b5c63/html5/thumbnails/11.jpg)
15-11 Copyright © 2004, Oracle. All rights reserved.
The Debug Console: Breakpoints Panel
• Stack
• Variables
• Watch
• Form Values
• Loaded PL/SQL Packages
• Global and System Variables
• Breakpoints
![Page 12: Oracle forms Lesson 15 debuging triggers](https://reader036.vdocuments.mx/reader036/viewer/2022082405/54531f77af7959c07f8b5c63/html5/thumbnails/12.jpg)
15-12 Copyright © 2004, Oracle. All rights reserved.
The Debug Console
• Stack
• Variables
• Watch
• Form Values
• Loaded PL/SQL Packages
• Global and System Variables
• Breakpoints
![Page 13: Oracle forms Lesson 15 debuging triggers](https://reader036.vdocuments.mx/reader036/viewer/2022082405/54531f77af7959c07f8b5c63/html5/thumbnails/13.jpg)
15-13 Copyright © 2004, Oracle. All rights reserved.
Setting Breakpoints in Client Code
Breakpoints:
• Suspend form execution
• Return control to the debugger
• Remain in effect for the Forms Builder session
• May be enabled and disabled
• Are set in the PL/SQL Editor on executable lines of code
Before setting breakpoint:
After setting breakpoint:
![Page 14: Oracle forms Lesson 15 debuging triggers](https://reader036.vdocuments.mx/reader036/viewer/2022082405/54531f77af7959c07f8b5c63/html5/thumbnails/14.jpg)
15-14 Copyright © 2004, Oracle. All rights reserved.
Setting Breakpoints in Stored Code
• Can set on stored program units:– Expand Database Objects node– Expand <schema> node– Expand PL/SQL Stored Program Units node– Double-click program unit– Set breakpoint in PL/SQL Editor
• Cannot set on database triggers or stored PL/SQL libraries
• Compile with debug information
![Page 15: Oracle forms Lesson 15 debuging triggers](https://reader036.vdocuments.mx/reader036/viewer/2022082405/54531f77af7959c07f8b5c63/html5/thumbnails/15.jpg)
15-15 Copyright © 2004, Oracle. 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.
![Page 16: Oracle forms Lesson 15 debuging triggers](https://reader036.vdocuments.mx/reader036/viewer/2022082405/54531f77af7959c07f8b5c63/html5/thumbnails/16.jpg)
15-16 Copyright © 2004, Oracle. All rights reserved.
Running a Form in Debug Mode
Run FormDebug
Contains source code and
executable run file.FMX
(Compiles automatically)
(Runs automatically)
Runs Form inDebug Mode onServer specified
in Runtime Preferences
![Page 17: Oracle forms Lesson 15 debuging triggers](https://reader036.vdocuments.mx/reader036/viewer/2022082405/54531f77af7959c07f8b5c63/html5/thumbnails/17.jpg)
15-17 Copyright © 2004, Oracle. All rights reserved.
Stepping Through Code
Step over
Stepout
Stop
GO
Stepinto
Pause
![Page 18: Oracle forms Lesson 15 debuging triggers](https://reader036.vdocuments.mx/reader036/viewer/2022082405/54531f77af7959c07f8b5c63/html5/thumbnails/18.jpg)
15-18 Copyright © 2004, Oracle. All rights reserved.
Debug Example
…calls...
The results are: ??WHEN-BUTTON-PRESSED
1
Procedure XYZ;
Function ABC;
2
3
4
5
Debug Example
![Page 19: Oracle forms Lesson 15 debuging triggers](https://reader036.vdocuments.mx/reader036/viewer/2022082405/54531f77af7959c07f8b5c63/html5/thumbnails/19.jpg)
15-20 Copyright © 2004, Oracle. All rights reserved.
Summary
In this lesson, you should have learned that:
• The Debug Console consists of panes to view the call stack, program variables, a user-defined watch list, Form values, loaded PL/SQL packages, global and system variables, and breakpoints
• You use the Run Debug button to run a form module in debug mode within Forms Builder
• You can set breakpoints in the PL/SQL Editor by double-clicking to the left of an executable line of code
• The debug buttons in the Forms Builder toolbar enable you to step through code in various ways
![Page 20: Oracle forms Lesson 15 debuging triggers](https://reader036.vdocuments.mx/reader036/viewer/2022082405/54531f77af7959c07f8b5c63/html5/thumbnails/20.jpg)
15-21 Copyright © 2004, Oracle. All rights reserved.
Practice 15 Overview
This practice covers the following topics:
• Running a form in debug mode from Forms Builder
• Setting breakpoints
• Stepping through code
• Viewing variable values while form is running