Teradata provides several library functions to enable programmers to debug their functions and external procedures, or for any other useful purposes.
See Teradata Vantage™ - SQL External Routine Programming, B035-1147 for further information about these UDF- and external procedure-related trace library function calls.