Quick, nitty gritty, yet manageable PHP debugging:

echo '<pre style="max-height: 400px; overflow-y: scroll; padding: 20px; font-size: 12px; border: 1px dashed #aaa; margin-bottom: 20px; background-color: #ccc;">'; print_r($output); echo '</pre>';

Produces something along the lines of:

Dump

The container is scrollable, monospaced, and prettified; Enjoy!