PLplot provides some functions to help you debug the core code or driver code. You can find these function declarations in include/pldebug.h. I'll provide a short summary on this page.