WiPeD out trying to debug WordPress XMLRPC
Sterling Camden
So I was coding along one fine day, happily using my WiPeD debugger for WordPress, when I suddenly stumbled on a problem with it. I was attempting to debug a function that was hooked to an action that was supposed to be triggered by the MetaWebLog API (‘save_post’, when posting from a blog authoring tool), and none of my debug messages were being displayed! Suddenly the heel of my hand went *bonk* on my forehead — of course I couldn’t retrieve any messages from XMLRPC processing, because I was saving the messages in a session variable, and the client in that case is my authoring tool instead of my browser – so the sessions aren’t the same. Duh, time to rethink.
The downloadable version below saves the debug messages to the database instead of to a session variable. Obviously, that means that multiple users will mix their output in the log. Of course, you’d expect to be debugging on a private site, but just in case I added an options page where you can exclude users based on their capabilities — with the default being ‘level_9′ (administrators only). I also added options to allow you to customize when the debug log is displayed, as well as when it’s cleared. Spin it up, and check out the Readme-WiPeD.txt file.
UPDATE: get the latest version here.
Posted in PHP, Web, Wildly popular, WordPress |
10 Comments » RSS 2.0 | Sphere it!





[...] UPDATE: get an updated version here. [...]
This looks great, can’t wait to try. Like you said, I’m always using a ton of echo statements that may or may not actually give me any clue what’s going on. Should help make things easier.
Hmm… I seem to get a fatal error trying to activate it.
Parse error: syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in [MY PATH]/plugins/WiPeD.php on line 13
What version of PHP are you using?
PHP 4.4.7 on WordPress 2.3.1. Sorry, is it PHP 5 only?
I’ll have to check to see if I used a PHP5-only feature, then if so I’ll figure out a away to do it PHP4-compatible.
I emailed you a modified version. If it works out for you, let me know and I’ll publish it here.
Thanks for testing it out, Rirath. It can be downloaded here.
[...] Peak (aka Rirath) helped to identify an incompatibility with PHP version 4 in my WiPeD plugin for WordPress. Now, if back-porting to version 4 had involved a major rewrite I would have said [...]
[...] 15th 2007 12:40pm [-] From: chipstips.com [...]