Tracing and Debugging


In the set trace flags on the signon page use Each Statement or you can configure this through:

PeopleTools > Utilities > Debug > Trace PeopleCode

Use Show Each to log all the PeopleCode that fires during your trace. This will tell you what PeopleCode and events are firing (and what is not firing) and is usually enough to give you an idea of what is going on. The best thing is that this trace produces a much smaller log file than selecting most of the other PeopleCode trace settings, making the PeopleCode trace manageable! Remember when it comes to tracing/logging, less is more.

Another way to set up specific tracing in Your PeopleCode is by using the SetTraceSQL and SetTracePC functions. For example:

/* Turn on tracing */
SetTracePC(3596);

/* PeopleCode you want to trace */

/* Turn off tracing */
SetTracePC(0);

Also, here's a simple example of how to log to a file in your PeopleCode if you need it.

&fileLog = GetFile("C:\temp\LOGFILE.log", "w", "a", %FilePath_Absolute);
&fileLog.WriteLine("Begin");
&fileLog.WriteLine("End");
&fileLog.Close();
It is a bad idea to use hardcoded absolute paths so adjust this code accordingly.

Revision #2
Created Thu, Aug 8, 2019 2:42 PM by PeopleSoft Wiki
Updated Thu, Aug 8, 2019 2:47 PM by PeopleSoft Wiki