PSM Debug

Debug Compile

The users can run Debug Compile on PSM statements except anonymous statements through the Debug Compile button on the Toolbar. Debug Compile is required before starting debugging to track variable values and set breakpoints.

If Debug Compile succeeds, a success message is displayed and the CREATE (OR REPLACE) syntax is executed in Debug mode.

If it fails, an error message is displayed and the error is displayed on the Error tab.

Debug

Debug is a feature that allows the users to track and analyze the execution process of PSM code step by step.

If necessary, Setting breakpoints to check the program status at specific points and registering variables to track changes in variable values at each step of the run are available.

It also provides various execution control options such as Step Into, Step Over, and Step Any Return.

When debugging, the Compile / Run / Debug Compile / Debug buttons in the PSM Editor Toolbar area are disabled, and the Terminate Debug / Step Into / Step Over / Step Any Return buttons are enabled.

Debug control functions

The following control functions are provided during debugging.

Feature
Description

Terminate Debug

Terminates debugging immediately.

Resume

Proceeds to the next set breakpoint.

Step Into

Proceeds to the next line.

Step Over

In the case of a program call, enters the subprogram.

Step Any Return

Proceeds to the next line. (Step Out)

Breakpoint List

Figure 1. Breakpoint list

The users can check the breakpoints set in the program currently being debugged in the form of a table. The columns have the following column names.

  • Object Type: Type (PROCEDURE / FUNCTION / PACKAGE BODY) of the object where the breakpoint is specified; for breakpoints created in the Editor, an empty value is displayed.

  • Object Name: Name of the Object where the breakpoint is specified. For breakpoints created in the Editor, the Editor name is displayed.

  • Line: The location of the breakpoint

  • Status: Whether the breakpoint is enabled or disabled. (Usable | Disable)

  • Description: Breakpoint description. This can be changed by double-clicking on the table cell.

Debug Tab

Figure 2. Debug Tab. 좌측 Call Stack, 우측 Variable / Watch

Call Stack

During debug, the users can check the call stack of the currently running subprogram through Call Stack. The called subprograms are displayed, and yhe users can track where each step is executed.

By selecting a specific subprogram in the Call Stack, The users can jump to the current execution of that program and easily understand the nested calling structure. They can also check the values of the selected program's parameters and local variables for efficient debugging.

Variable / Watch

Provides a function to monitor the value of a variable in real time while debugging.

Variable

The Variable tab displays the Name, Value, and Type of all variables in the selected scope. It analyzes the script and automatically registers the variables that exist in the program. To add additional variables, the users can click the [+ Add Variable] button at the bottom right of the Variable tab. They can also change the Watch status of a specific variable or all variables via the checkboxes in the Watch Column of the table and the Context menu.

Figure 3. Add Variable

Watch

The Watch tab displays a list of watch variables registered in Variable. The tab displays the Name, Value, Type, and Previous Value of the variable registered as a Watch Variable. The users can change the Watch status of a specific variable or all variables by using the checkboxes in the Watch Column of the table and the context menu.

Figure 4. Debug > Watch tab

Last updated