Starting the debugger v16
Use pgAdmin 4 to access the debugger for standalone debugging. To open the debugger:
Select the name of the stored procedure or function you want to debug in the pgAdmin 4 Browser panel. Or, to debug a package, select the specific procedure or function under the package node of the package you want to debug.
Select Object > Debugging > Debug.
You can use the Debugger window to pass parameter values when you are standalone debugging a program that expects parameters. When you start the debugger, the Debugger window opens to display any
IN OUT parameters the program expects. If the program declares no
IN OUT parameters, the Debugger window doesn't open.
Use the fields on the Debugger window to provide a value for each parameter:
- The Name field contains the formal parameter name.
- The Type field contains the parameter data type.
- Select the Null? check box to indicate that the parameter is a
- Select the Expression? check box if the
Valuefield contains an expression.
- The Value field contains the parameter value that's passed to the program.
- Select the Use Default? check box to indicate for the program to use the value in the Default Value field.
- The Default Value field contains the default value of the parameter.
If you're debugging a procedure or function that's a member of a package that has an initialization section, select the Debug Package Initializer check box to step into the package initialization section, This setting allows you to debug the initialization section code before debugging the procedure or function. If you don't select the check box, the debugger executes the package initialization section without allowing you to see or step through the individual lines of code as they execute.
After entering the desired parameter values, select Debug to start the debugging process.
The Debugger window doesn't open during in-context debugging. Instead, the application calling the program to debug must supply any required input parameter values.
After you complete a full debugging cycle by stepping through the program code, the Debugger window reopens. You can enter new parameter values and repeat the debugging cycle or end the debugging session.