PeopleCode Debug

17 04 2009

Sometime, we will need to investigate in PeopleCode for debug. Here is a short introduction for doing so.

1. Use Getfile to debug PeopleCode

We simply use a file to log the data and variables.  Here is a similar article about this (http://peoplesoftexperts.blogspot.com/2005/12/debug-peoplecode-using-getfile.html ), I am also writing the PeopleCode as the following:

/* Debug Part*/

SQLExec(“select sysdate from dual”, &ddate);

&DFILE = GetFile(“\\machine_name\Output\dfile.txt“, “A”, %FilePath_Absolute);

If &DFILE.IsOpen Then

&DFILE.WriteLine(&ddate | “Your Data”);

&DFILE.Close();

End-If;

/* Debug Part End*/

What we do is to put the code in the place,  we are going to debug.

2. Debug Mode in Application Desinger

It would be better to have an IDE to debug the application and code, which is provided by Application Designer. We can use its debug mode to do the job. Here is way to enable the debug mode for 3-tier (PIA). There is a detail How-to in PeopleBook System and Server Administration, Chapter 12, Chapter 12 Configuring Trace and Debug Settings: http://download.oracle.com/docs/cd/E05317_01/psft/acrobat/pt849svt-b0307.pdf

While the following is a brief:

1. Enable PC Debugger in PSADMIN

2. Set the PSDBGSRV Listener Port in PSADMIN and Enable the log.  Normally, it is 9500, for example in .cfg file:

  • Values for config section – PeopleCode Debugger
    PSDBGSRV Listener Port=9500
    DebuggerMsgLogEnable=1

3. Set Multiple PSAPPSRV Server Processes and Timeout to 0.  For example:

  • 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
    Auto Select Prompts=1
    Tuxedo Queue Size=65535

4. Open the Configuration Manager to ensure the PSDBGSRV Listener Port is 9500 on the same machine of Application Server

5. Login to Browser (PIA) and Application designer in three tier (App Server) with same and unique UserId.

6. In application designer, start debugger. Enable “break at Start” or set “break points” and access Page / Component to be debug in browser.

Advertisement

Actions

Information

One response

24 04 2009
John

Good job bro. This stuff is really useful!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.