[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pdt-dev] Suggestion: Specifying a subfolder as the web root


I've noticed that the PDT debugger expects that the eclipse project root be the web root. This, although common, isn't how we structure our projects at my workplace, and so doesn't break at breakpoints and sometimes source lookup selects the wrong php files.

The layout we use is such as:


As I am a keen user of PDT, I've rewritten the parts of the debug core that cut off the directory reported back from Zend Debugger to work with this layout, so me and the other people in the company I work for can debug properly, but I think this is a feature that should really be considered in the PDT instead, as its a common problem that will stump most people, (and also so I don't need to redo the changes every time you make changes to the PDT ;) )

The areas I change are basically the parts that return lengths to cut off paths or generating the eclipse path lookup, e.g. in PHPDebugTarget function getStackFrames replacing:

length = fHTDocs.length();
length = fHTDocs.lastIndexOf('/');

I'm not sure how you would go about implementing this, I guess in the debug configuration having a text box, with a default value of ".", meaning the web root is the project root, or ".." meaning the web root is a child folder of the project root.

Alternatively I guess this could be done by adding directories to a list (in my case project/http and project/https), and the debug core would lookup these entries and cut from the right point.

Also, on the debug configuration, for each new configuration, a user has to select the starting script. It seems to me this is only really used to generate the starting url, which in most cases would be the server web root. Could this not just be set by default to fire from the configured server web root?



The next generation of MSN Hotmail has arrived - Windows Live Hotmail