I have done the same where I have created a log file and then written to it at certain points. Another trick I have done is to test my PeopleCode outside of App Engine using the debugger. Then, once I know it is working as desired, I plug it into App Engine.
I found a way to interactively debug pplcode in an app engine meaning using the debug menu in App Designer and go through each breakpoints.
I created a page with a push button. In the fieldchange pplcode event of that field, use the callappengine() function, set the breakpoint there, it will flow to the peoplecode of the app engine. ...