Comment puis-je jeter variables dans Yii pour le débogage?

Comment puis-je vider et imprimer les valeurs des variables dans Yii pour le débogage? Je voudrais utiliser var_dump() ou print_r(). J'ai essayé d'utiliser Yii::trace() mais il se bloque avec cette erreur dans runtime/logs/app.log. Il n'a même pas me dire la ligne dans mon code qu'il échoue.

2015-03-18 20:54:11 [::1][-][-][warning][yii\log\Dispatcher::dispatch] Unable to send log via yii\debug\LogTarget: Exception 'Exception' with message 'Serialization of 'SimpleXMLElement' is not allowed'

in /cygdrive/c/Users/Chloe/workspace/AffiliateArbitrage/vendor/yiisoft/yii2-debug/LogTarget.php:58

Stack trace:
#0 /cygdrive/c/Users/Chloe/workspace/AffiliateArbitrage/vendor/yiisoft/yii2-debug/LogTarget.php(58): serialize(Array)
#1 /cygdrive/c/Users/Chloe/workspace/AffiliateArbitrage/vendor/yiisoft/yii2-debug/LogTarget.php(112): yii\debug\LogTarget->export(Array)
#2 /cygdrive/c/Users/Chloe/workspace/AffiliateArbitrage/vendor/yiisoft/yii2/log/Dispatcher.php(183): yii\debug\LogTarget->collect(Array, true)
#3 /cygdrive/c/Users/Chloe/workspace/AffiliateArbitrage/vendor/yiisoft/yii2/log/Logger.php(170): yii\log\Dispatcher->dispatch(Array, true)
#4 [internal function]: yii\log\Logger->flush(true)
#5 {main}

De référence
http://www.yiiframework.com/doc-2.0/guide-runtime-logging.html

OriginalL'auteur Chloe | 2015-03-19