Setting stored procedure debug preferences

The DB2® Stored Procedure Debugger preference page allows you to set preferences for stored procedure run times, variable character limits, error tracing, and the debug session manager.

Selecting Window > Preferences from the workbench menu bar opens the Preferences dialog box. Stored procedure debug settings specified in this dialog box do not take effect until the start of the next session. In the dialog box, choose Run/Debug > DB2 Stored Procedure Debugger to access the following preferences that you can set for debugging procedures:

Table 1. DB2 Stored Procedure Debugger Preferences
Preference Explanation
Number of seconds of inactivity before the procedure runs to completion If you stop debugging an SQL stored procedure for the length of time specified in this field, the debug session will terminate and the procedure will run to completion. The default value of this setting is 300 seconds.
Note: This setting does not apply when debugging Java™ stored procedures.
Maximum number of characters reported in large variables This setting controls the maximum number of characters that are displayed for the value of variables in the Variables view. The default value of this setting is 80 characters.
Note: This setting does not apply when debugging Java stored procedures.
Number of characters per line in Variables View Details Pane This controls the position at which characters will wrap in the Details Pane in the Variables view. Each line of the Details Pane will have the number of characters specified and then wrap to the next line. The default value of this setting is 72 characters.
Note: This setting does not apply when debugging Java stored procedures.
Diagnostic error trace level on DB2 server This determines the level of error tracing on the DB2 server. Valid entries in this field are:
  • 0 - Indicates that no tracing will occur. This is the default value.
  • 1 - Indicates that only serious errors will be logged.
  • 2 - Indicates that all trace messages will be logged.
DB2 Routine Debug Session Manager Location section The session manager connects the debugger user interface to the DB2 server and must be running before the debug session can start. In this preference section, you can choose to use a session manager on the server the stored procedure is being run on or use an existing session manager.
  • To use the session manager on the server that the stored procedure is being debugged on, select the Run the session manager on each connected server radio button. To use the default session manager, leave the Port field blank. If you are using a different session manager, enter the port number that you want the session manager to run on in the Port field. If the session manager is not currently running on the server, it will be started automatically when you start debugging. The Session manager timeout in minutes field specifies how long a newly created session manager will sit idle after completing a debug session before stopping automatically.
  • To use an existing session manager, select the Use already running session manager radio button. In the Host field, enter the host name or IP address of the machine that the session manager is running on. In the Port field, enter the port that the session manager is running on.

A standalone session manager can be used when the DB2 server that you are debugging does not have a session manager available.

To start a standalone session manager, run the db2dbgm batch file under the install directory for this product (there are two different batch files: db2dbgm.bat is for Windows and db2dbgm is for Linux). You can modify the batch file to specify a different port value if the default value is not available.

You must start the standalone session manager before you try to use it with this product and you must specify in the stored procedure debug preferences that you are using a standalone session manager. To do this, open the DB2 Stored Procedure Debugger preference page, select the Use already running session manager radio button, and complete the Host and Port fields as described above.

Related tasks
Setting up the LUW server for debugging
Using the Data Output view
Running
Terminating and suspending

Feedback