Eclipse PDT + XDEBUG - original search doesn't work completely

I am having problems with a PHP project using Yii framework. My setup is Win7 + Eclipse4.2 + PDT 3.1 + Yiiclipse PDT extension + WAMP server with XDEBUG enabled.

Almost everything works fine. The debug session starts, it goes through the index.php source, but when it has to navigate to the framework files, it doesn't open them. I edited the original search and added the local infrastructure path, but it just can't find them.

Here is a screenshot: http://img607.imageshack.us/img607/3687/eclipsepdt.png

http://img607.imageshack.us/img607/3687/eclipsepdt.png

+3


source to share


2 answers


It's not necessarily an answer, but your question isn't necessarily a question either, so I feel like it's fair play: D

I have had so many problems with Eclipse PDT + xdebug in the past with debugging, code completion, etc. that I recently gave it up and switched to Netbeans for PHP debugging. This is now the defacto standard in my development team for PHP debugging; even though we all have our favorite editors, when we need to debug, we'll still use Netbeans.



Code completion, phpdoc tooltips on completion and debugging all work are flawless for me no matter what platform I develop on (Windows, OS X, Linux) and I can't say the same about Eclipse PDT (code completion is often missed , I ran into problems or debug failure, etc.) in my personal experience.

So, I apologize in advance if this is not the answer to the question, but maybe try Netbeans ?

0


source


Are you sure you can use Xdebug to debug Yii applications (or any other framework-based) applications? Since Yii introduces URL rewriting based on the MVC pattern, I think you can't.

I don't have much experience with Xdebug, but from what I have found, I can clearly see that it (along with Eclipse PDT) is highly dependent on the URL displayed in the internal Eclipse browser when debugging.

So, take for example the URL from your screenshot:

http://localhost/testdrive/index.php?r=dispozitive

      

As you mentioned, Eclipse opened correctly index.php

, which is normal since it links directly to the url and you probably specified it as the start file in the debug config window.



Booth moves on. How would you like Eclipse to understand that the route itself dispozitive

(where the route itself is an entirely Yii concept (or similar structure) and Eclipse / Xdebug / PHP knows nothing about it) or that the parts of the ?r=dispozitive

URL correspond to the execution of a protected/SiteController.php

file on your filesystem, and calling by default actionIndex()

from it? Therefore, he might know that he should open it in the IDE and possibly stop execution at certain breakpoints.

This process and concept (routing) is 100% Yii created and built internally by Yii, so how would you like Eclipse or Xdebug to know about this?

As I wrote, I don't have much experience in debugging Yii applications, but from what I have found until I know, I can clearly see that you cannot debug PHP applications with Xdebug if they use any or URL Rewriting Methods. This method (debugging with Xdebug) only works IMHO in the case of applications where URL changes directly reflect files on the filesystem in your application's content.

EDIT . Also, check which version (package) of Eclipse do you have? It turns out that the Helios package has some bugs and doesn't stop at breakpoints. This makes it pretty useless for the debugging process. Instead, you should use the Galileo Package Eclipse for PHP Developers .

0


source







All Articles