Search code examples
phpeclipsedebuggingyiizend-debugger

debugging a Yii web application using Zend Debugger in Eclipse


I have Zend debugger running successfully in Eclipse but I don't understand how to debug a Yii project. I.e, I can debug a single page PHP script but I don't know what the configuration options are supposed to be for a Yii web application.

For example, I was thinking the Controller file would be the file I would select to actuall debug but it says the file can't be found. I've attached a screen shot of what the options are.

I've used the Firefox Zend Debugger extension and that works great. Now, I just want to know how to do the equivalent of that in Eclipse.

The basic options are: File and URL


Solution

  • Have you debugged other applications using Eclipse? If so, it shouldn't be much different:

    1. I'm usually debugging on /, meaning I login to the application, go wherever I need to, then prepare the debugged scenario (including breakpoints where appropriate). Next, I run a "general" debug session -> a new tab is opened on the browser. I ignore this tab and instead go back to the tab where I prepared the scenario I want to debug and continue there.
    2. I usually go with marking / or /index.php as the "debug entry point" (or whatever the term is). If needed (I don't think I needed to with Yii), I would have config some "paths" that tell the IDE that "/" is translated/represented by HTDOCS. Again, I don't think I needed to with Yii (but I debugged little with Yii thus far).
    3. I once had a blog post on debugging Drupal with PDT (which is Eclipse) and xDebug (which is an alternative to the Zend Debugger and essentially the same). You might find it useful: link.

    Good luck!