Debugging a Package

This example shows how to debug a package in dbForge Studio for Oracle. Use provided scripts to create sample objects in your test database.

Creating a Sample Package

Procedure

Use the script available in How To: Debug a Stored Procedure to the procedure used in the sample below.

Package

Use the script below to create the IU_Schedule_Detail package:

-- PACKAGE_SCHEDULE specification
CREATE OR REPLACE PACKAGE SCHEDULE.Package_Schedule AS
PROCEDURE FILLSCHEDULE(DATE_FROM IN DATE, DATE_TO IN DATE,SCHEDULE_ID IN INT);
FUNCTION GetFirstDayOfMonth(DT DATE) RETURN DATE;
END Package_Schedule;
/

Debugging a Package

To debug a package:

  1. In Database Explorer, expand the Packages node.
  2. Choose the name of the required package and expand the node.
  3. Choose the FILLSCHEDULE procedure.
  4. Right-click the procedure name, select Compile, and then click Compile Dependants For Debugging on the shortcut menu.
  5. After the procedure is compiled, right-click it once more and click Step Into to start debugging.
  6. Follow the instructions specified in the Debugging a Stored Procedure topic regarding the process of debugging the procedure.

Note

You can also debug a package from other PL/SQL programs, which call package procedures or functions using the same way for schema procedures and functions debugging.