Applies to:

PeopleSoft Enterprise PT PeopleTools - Version: 8.4
Information in this document applies to any platform.

This document was previously published as Customer Connection Solution 721276

Symptoms

SPECIFIC TO : Enterprise, Peopletools 8.4x Release & 8.5x

ISSUE:
Customer is trying to use the Peoplecode Debugger, but its not working

Cause

Not Applicable

Solution

SOLUTION:
1. To use the PeopleCode Debugger in 8.4, you must log-on to Application Designer in the 3-tier mode.
2. Open any definition that allows PeopleCode and select Debug, Enter Debug Mode from the Application Designer
3. Once the PeopleCode Debugger mode is activated, a Local Variable dialog box appears.
4. Setup the breakpoints by placing your cursor on the desired line of code and choose Debug, Toggle Break at Cursor. This is useful because you wouldn't necessarily want to debug all of the PeopleCode programs associated with an application at one time.
5. When you run the application and the debugger hits the break point, your application designer session will begin to blink and it also halts program execution. You can then step through each line of code by selecting Debug, Step (or pressing F8) to execute it. You can check the value of the variables you have in the program in the Local Variable dialog box. These values are updated as the code runs.
6. You must log-on to PIA using the same User ID that you used to log-on to Application Designer in 3-tier mode.

For more information, please refer to the PeopleBooks -> PeopleCode Developer's Guide -> Debugging Your Application.
Below is a list of the following things that need to be setup in the Appserv.CFG file
This is for PT840
Appserver needs to have Debugging enabled.
Below is a list of the following things that need to be setup in the Appserv.CFG file

[PSAPPSRV]
;UBBGEN settings
Min Instances = 2
Max Instances = 2
Service Timeout = 0

[PSOPTENG]
;UBBGEN settings
Maxinstances=2
Service Timeout=0

[PSSAMSRV]
; UBBGEN settings
Min Instances=1
Max Instances=3
Service Timeout=0
Peoplecode debugger is only applicable for on-line page debugging no trace files will be generated.

Setting up debugging for a three tier connection:

Use three-tier debugging to debug three-tier Windows applications and PIA applications. For three-tier debugging, use PSADMIN to make sure that the following items are set.

The appropriate PSDBGSRV Listener Port is specified in the PeopleCode Debugger section of PSADMIN.

At least two PSAPPSRV processes configured to boot in the domain with the Service Timeout parameter set to 0 (zero).

You select Yes at the "Enable PSDBGSRV Server Process" prompt at the end of the PSADMIN interface.

You set these parameters as you configure or create a domain.

Setting the PSDBGSRV Listener Port

In the PeopleCode Debugger section of PSADMIN make sure that the value assigned to the PSDBGSRV Listener Port is not already in use by another application or listener on the application server. The default value is 9500. If the default is not acceptable, assign a suitable value to the parameter. If it is acceptable, no changes are required.

For example,

Values for config section - PeopleCode Debugger

PSDBGSRV Listener Port=9500


Do you want to change any values (y/n)? [n]:

Consider the following when debugging PeopleCode:

If multiple application server domains are running on a single, physical machine, each domain needs to use different debugging port numbers. Otherwise, there is contention for the PSDBGSR Listener Port value. This is the same principle that requires each application server domain on a server to have unique workstation listener port numbers.

When you are not debugging, the Enable Debugging parameter should be turned off (set to 0). The debugging mode results in an unavoidable amount of overhead, which can degrade performance.

Regarding performance, you should not perform debugging on a production domain. Debugging should be performed on a designated testing domain only.

Enabling Multiple PSAPPSRV Server Processes

The minimum requirements for PeopleCode debugging are:

Two (2) PSAPPSRV server processes configured to boot in the domain.

The Service Timeout value in the PSAPPSRV configuration section must be set to zero (0).

For the debugger to work, it has to run in parallel with the application it's debugging. Suppose your domain only has one PSAPPSRV server process running. In this case, the PSAPPSRV can process the requests of only one component at a time, and therefore debugging is not possible. Debugging involves two items, the debugger (PSDBGSRV) and the PSAPPSRV server process running the application PeopleCode.

Provided that you have two PSAPPSRV server processes configured, one PSAPPSRV handles the debugger program while the other handles the application you're stepping through with the debugger. In this case, the two programs run in parallel, which enables interactive debugging.

The configuration templates that PeopleSoft delivers all have at least two PSAPPSRV processes. However, if you are using a custom template, make sure you configure the domain to start two PSAPPSRV processes prior to debugging. To do this, in PSADMIN set the Min Instances parameter in the PSAPPSRV section to 2.

You must set the Service Timeout parameter for PSAPPSRV to zero. Disabling service timeouts prevents the application server processes from timing out if you stop at a particular point in your program while debugging.

The following example shows a sample PSAPPSRV section properly configured for debugging PeopleCode:

Values for config section - PSAPPSRV

Min Instances=2

Max Instances=2

Service Timeout=0

Recycle Count=0

Allowed Consec Service Failures=0

Max Fetch Size=5000


Do you want to change any values (y/n)? [n]:

When configuring the PeopleCode debugger:

PeopleSoft recommends using the "Developer" configuration template because this template, by default, provides two PSAPPSRV server processes and has Service Timeout set to zero.

PeopleSoft recommends using a simple configuration where you are assured that the server that PeopleSoft Application Designer connects to is the same server that the application you are debugging is running on.

Important. If you do not have the settings for PSAPPSRV set correctly (at least two PSAPPSRV processes with the Service Timeout value set to 0 (zero), PSADMIN automatically sets these values to comply with the minimum requirements when you enable PeopleCode Debugging (as discussed in the next section).
Requesting a PSDBGSRV Server Process

After you have specified your settings using PSADMIN the system prompts you with a series of options, such as setting up messaging server processes, enabling Jolt, and so on.

When prompted to enable the PSDBGSRV, enter y to indicate Yes. The Developer template defaults to y.

Do you want to enable PeopleCode Debugging (PSDBGSRV) (y/n)? [n]:y

*************************************************************************************************************************************************************

Tracing options in PIA.

1> In Configuration.properties file.

# Debug/Trace Settings

# If set to true, user will see url at sign on for setting trace parameters.
# Default: false
EnableTrace=false

If this parameter is set to TRUE, then user can set tracing for particular session/ logon.
Open SIGNINTRACE.HTML file in browser.
Select options/ check box for SQL and PEOPLECODE trace in the panel.
Then trace will be on exclusively for this session.

Ct had multiple instances running on the same machine, which didn't trigger the Peoplecode debugger earlier.Also If the default port no. is not specified for the DBGSRV.exe listener , then the Peoplecode debugger won't work.