Usiing Yii's built-in debugging and logging tools

Hey, I hope this is the right place to post questions. I have been trying to implement what tonydspaniard wrote about in his article. However i am having some trouble, i was hoping someone here could give me some kind of guidance.

This is the relevant part of my main/config file:













In protected/views/site/index.php

function fb($what){

  echo Yii::trace(CVarDumper::dumpAsString($what),'vardump');


And finally in a view file where i am trying to display the log correspondant to my Yii::app()->user var. As far as i understood, i have to just call the function defined in my index file… like this

 $test = 'This is a test';


However this gives me an error:

Fatal error: Call to undefined function fb() in C:\xampp\htdocs\…\main.php on line 49

I must be missing something pretty important, but i just cant figure out what it is! Thanks in advance

The index.php Antonio refers to is the applications start script, not the site controllers index view script.


Oops! My bad… Should have seen it. That did the trick thank you very much!

btw., it’s not the right place. It’s for “Yii 1.0.x Discussions”.