Here is a neat trick for debugging plugins in MODX Revolution -- don’t know why I didn’t think of it sooner. Create a chunk called debug. Put code like this in your plugin:
<?php // don't paste this line
$chunk = $modx->getObject('modChunk', array('name'=>'debug'));
/* Put any debugging information in the string, $s */
$ids = $modx->getParentIds(58); // example function
$s = 'Debug output' . "\n\n";
$s .= print_r($ids,true); // example debug output
$chunk->setContent($s);
$chunk->save();
You can use Quick Update Chunk to view the debugging output, which will change each time the plugin executes.