Next time you need to do some in-line PeopleCode debugging, rather than the traditional approach of using MessageBox, or WinMessage, consider using the PeopleCode WriteToLog function (see PeopleBooks reference).

To summarise, the WriteToLog function consists of two parameters:

  • Log fence setting, I usually use %ApplicationLogFence_Error (1) to ensure it will write a log file
  • The relevant text string to be written to the log file

When called, it will write to a file called something like <OPRID>_<IP>.tracesql in the application server logs folder (where you would typically find other trace files).

The thing I like best about this is that it is unobtrusive. It doesn't impact other users and it doesn't stop execution flow (nothing worse than a MessageBox in a loop that you have to click through 50 times!).

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License