Debugging Object Method
Last modified: August 17, 2021
dbForge Studio PL/SQL Debugger allows debugging object static and member procedures and functions. The process of object method debugging can be initiated by calling this method in the PL/SQL program. Put the breakpoint on the line where the object method is called.
On the Debug menu, click Step Into. Alternatively, press F11 to step into the body of an object method.
Creating a Sample Object Type
Procedure
Use the script available in Debugging a Stored Procedure to the procedure used in the sample below.
Object Type
Execute the following script to create an object type:
CREATE OR REPLACE TYPE SCHEDULE.REC_TYPE1
AS
OBJECT (DATE_OUT DATE,
DAY_ORDER SMALLINT,
TIME_SHEET_DATE DATE,
MEMBER PROCEDURE ADMIT(DAYOPER SMALLINT));
/
CREATE OR REPLACE TYPE BODY SCHEDULE.REC_TYPE1 AS
MEMBER PROCEDURE ADMIT
( DAYOPER SMALLINT) AS
BEGIN
DAY_ORDER := DAYOPER;
END;
END;
/
Debugging an Object Method
To debug the method of a created object, call it in the PL/SQL block and run the debugging process of this block. Select Step Into command when the debugger reaches the line where an object procedure call is fulfilled to step inside the method definition.
TYPE ENUM_TYPE IS TABLE OF REC_TYPE;
DAY_ENUM ENUM_TYPE;
DAY_ENUM2 REC_TYPE1;
BEGIN
DAY_ENUM2 := REC_TYPE1(DATE_FROM, NULL, SYSDATE);
DAY_ENUM2.ADMIT(1);
...
END;
Want to find out more?
Overview
Take a quick tour to learn all about the key benefits delivered by dbForge Studio for Oracle.
All features
Get acquainted with the rich features and capabilities of the tool in less than 5 minutes.
Request a demo
If you consider employing this tool for your business, request a demo to see it in action.