As a newb to Yii who is working with a fairly large existing application, I am having trouble following the execution path, and determining which widgets and other Yii elements are being rendered to the page. Is there a good method for this? Perhaps a debug mode? Or if not, just a general algorithm for the steps I should take, starting with a url, to determine everything that is ultimately included on the page?
Thanks again. I have read the logging section in the docs a couple times, and I still can’t figure out how I would actually use it in my code. I tried putting a call to Yii::trace(‘test’, ‘system.web.CController’) in one of my source files being executed but it didn’t seem to have any result. Can you give a quick code example? And afterwards, will I be looking for a log in the runtime folder, or is there some way to have the trace printed directly to the screen?
Make sure the following line isn’t commented out in the startskript
defined('YII_DEBUG') or define('YII_DEBUG',true);
You don’t need to specify the category parameter, it defaults to ‘application’ for your trace calls (contrary to ‘system’). I added an example below. It will log every level and category to both file and to the web page. As you already found out, the log file is written to protected/runtime/appplication.log.
One other question. The trace I see seems to be at a pretty high level of abstraction. I wanted to see how certain widgets and filters with those widgets, etc, were being called. Is there any way to do this?