Tracing and Debugging

You can use the -TRACE option to trace the SQL executed by an application engine program. This can be added either through the command line debugger or in the override parameters of the process definition.

To trace the PeopleCode executed by an application engine program use the -TOOLSTRACEPC option.

These are the various tracing options and what they do. Like all other PeopleSoft trace flags these are bit fields so if you want trace values 1, 2 and 4, you would set the trace to 1 + 2 + 4 = 7 (-TRACE 7).

Value Trace Setting
0 Disables tracing.
1 Initiates the Application Engine step trace.
2 Initiates the Application Engine SQL trace.
4 Initiates the trace for dedicated temporary table allocation to an Application Engine trace (AET) file. You can trace how the system allocates, locks, and releases temporary tables during program runs.
128 Initiates the statement timings trace to a file, which is similar to the COBOL timings trace to a file.
256 Initiates the PeopleCode detail to the file for the timings trace.
1024 Initiates the statement timings trace, but stores the results in the PS_BAT_TIMINGS_LOG and PS_BAT_TIMINGS_DTL tables.
2048 Requests a database optimizer trace file.
4096 Requests a database optimizer to be inserted in the Explain Plan table of the current database.
8192 Sets a trace for PeopleSoft Integration Broker transform programs.

Note that output from the -TRACE flag goes to the application engine trace (.AET) file. Output from the -TOOLSTRACEPC output goes to the PeopleTools trace file (.TRC).

To run application engine in debug mode, run the following from the command line of %PS_HOME%/bin/client/winx86.

psae.exe -CT DatabaseType -CD DatabaseInstance -CO OperatorID -CP OperatorPassword 
-R RunControl -I ProcessInstance -AI ApplicationEngineProgramName -DEBUG Y
You may need to install peopletools locally first.

The app engine will log into the database and present you with the following prompt:

PeopleTools 8.48.12 - Application Engine
Copyright (c) 1988-2007 PeopleSoft, Inc.
All Rights Reserved

Application Engine Debugger - enter command or type ? for help.


If you get an error about the environment variable PS_SERVER_CFG not being set, you will need to set up the following environment variables:

  • PS_SERVDIR pointing to your process scheduler location (e.g. %PS_HOME%\appserv\prcs\CS90)
  • PS_SERVER_CFG pointing to your process scheduler configuration file (e.g. %PS_SERVDIR%\psprcs.cfg)

You can view the current values in the state record, step into code - which will take you into app designer if it is a PeopleCode step. But the best feature is that it allows you to modify the contents of a state record.

Note that the following commands are available in the debugger:

Debug Commands:

       (Q)uit           Rollback work and end program
      E(X)it            Commit work and end program (valid between steps)
       (C)ommit         Commit work (valid between steps)
       (B)reak          Set or remove a break point
       (L)ook           Examine state record fields
       (M)odify         Change a state record field
       (W)atch          Set or remove a watch field
       (S)tep over      Execute current step or action and stop
  Step (I)nto           Go inside current step or called section and stop
  Step (O)ut of         Execute rest of step or called section and stop
       (G)o             Resume execution
       (R)un to commit  Resume execution and stop after next commit
No Comments
Back to top