There's a simple way to turn peoplecode and SQL tracing on and off using peoplecode, rather than having to set the trace values when you login or via PeopleTools > Utilities > Debug. You can use these commands to trace/debug only the peoplecode you're interested in.
For peoplecode tracing, you set the trace flags using the SetTracePC() function. e.g
SetTracePC(3596);
… will set the trace flags as per the defaults on the Trace Peoplecode page. These are the settings I usually use.
SetTracePC(0);
… will turn peoplecode tracing off.
The function for SQL tracing is SetTraceSQL().
There's more useful info on this in the Peoplecode Language Reference peoplebook, including what each of the trace flags do.