|Previous Top Next|
Database Workbench comes with a Stored Routine Debugger tool. You can reach this tool by using the context menu in the Database Navigator on any Stored Procedure, Stored Function or Package and selecting Debug Procedure, Debug Function or Debug Routine in Package. In the case of a package, the context menu will show the routines in the package in a submenu and you should click a specific routine.
Read the generic topic on the debugger first.
With Oracle, the server side debugging module needs to have "debug information" available, each routine you want to debug and step through line by line needs to be compiled with debug information. Database Workbench let's you compile a routine with debug information by using the context menu and select Compile With Debug Information.
Compile With Debug Information
Database Workbench will automatically compile the routine that you will be debugging as the most "outer" routine with debug information as soon as you start the debugger, routines you want to Trace Into, you need to compile with debugging information yourself. Obviously, when compiling a package with debug info, the complete package will contain the debugging information.
When debugging a package, Database Workbench will display the package-body in the code window. If you use Trace Into to a subroutine in the package, there will not be a new tab opened, but the "current line" will jump to another routine in the same window.
Debugging a package
Below is an example screenshot of a trace into action. The MyFunction routine calls the Multiply routine.
Traced into Multiply from the routine MyFunction