Xmsgtrace is an easy to use X11 protocol recorder for the X Window System. It can record the protocol messages (requests, replies, events, and errors) exchanged between your X program and the X server without requiring any modifications to your program.