I’ve just started learning yii framework from 3 weeks ago.
I just did some searches on the topic: debugging Yii projects with Netbeans IDE and XDebug.
I’ve configured XDebug with my Netbeans IDE and seems like everything works fine except one thing.
For example, I’ve created a project named “demo” using yiic command line tool. By default Yii created for me SiteController.
In address bar of Google Chrome I type “localhost/demo/index.php?r=site/login”. This will open the login view in browser. I wanna see what happens when I do that, so inside my Netbeans IDE I set a break point at the beginning of the function actionLogin() that is inside file SiteController.php. On the Projects view I right click on the demo project and chooses “Debug”, inside my Google Chrome nothing appears except at the address bar it says “localhost/demo/index.php?XDEBUG_SESSION_START=netbeans-xdebug” and the browser says it’s waiting for localhost. The IDE stars debugging index.php file (the entry script file for project) and from there I can step one by one line. But the thing is I want to see how actionLogin works and how everything changes after for example I’ve logined successfully. So I start again the process, but now instead of debugging whole project I chooses Debug-> Debug File (Ctr + Shift + F5) and get the error: “Access forbidden!”. Inside browser’s address bar I see “localhost/demo/protected/controllers/SiteController.php?XDEBUG_SESSION_START=netbeans-xdebug”. This error occurred because the existence of file .htaccess inside /demo/protected folder. I remove that for a second and start again the process. Now I get something like “Fatal error: Class ‘Controller’ not found in C:\xampp\htdocs\demo\protected\controllers\SiteController.php on line 4”. The problem is the script didn’t find the declaration for class controller. Now I’m really stuck at this step.
Hope you guys can give me a point to get through this issue!
Thanks in advanced!
P/s: what I really want is to see everything like the process of calling functions, variables’s values, the values of ActiveRecord instance,… If is there any extension that meets my need. Just let me know.