trace.py: debug helper tool