![]() |
|
Snippets |
|
This in the easiest way (I found) to debug an object (or variable).
$this->debugMessage(sprintf('<h1>object</h1><pre>%s</pre>', print_r(@$this->object, true)));
<?php use_helper('Debug') ?> <?php echo debug_message(sprintf('<h1>object</h1><pre>%s</pre>', print_r(@$object, true))) ?>
Based on symfony book debug page.
Comments on this snippet
Advanced version here : http://www.symfony-project.org/snippets/snippet/258