Thx a lot, with that solution ,it works…but I have another problem because the advanced search uses ajax for submit so the page doesn’t refresh and the log neither do it…and I can’t check changes in the values of $f1 and $f2… What can I do?
User Session : assign values during searching and get it where you want to show, if using ajax : then create a function in controller in print its result…IT has the advantages to take less time during development+ your are using for testing!
Yii::app()->session[‘var’] = ‘value’;
echo Yii::app()->session[‘var’]; // Prints “value”
So everyone has his/her own favorite style of debugging, but I think the logging to the file is the most basic and reliable measure to trace the program. You can count on it in almost all the situations.
However, what I usually do is the step tracing of the code in IDE or the browser’s developer’s tool.
And for CGridView, you may note that turning off ajax updating will make debugging far easier, just as le_top has implicitly suggested.
Acutally, the GET request is an ajx request, but I use the browser’s developer debugging tool to get the request.
When I want to examine a particular case, I even open that link in a new tab. That way all the search parameters are in the GET request and the page can be reloaded (F5) using the same parameters which can be handy during debug.