I have never used a debugger for PHP; I think your struggles are part of the 
reason why.

Instead I just use debug statements when I hit a problem - probably not quite 
as clean as using a debugger.

Something like this helps me a lot:


>       function pre_print_r($a) {
>               print "\n<pre>\n";
>               print_r($a);
>               print "\n</pre>\n";
>       }

https://github.com/dimmer/impphp/blob/master/Utilities.php


Well, that, and setup error and exception handlers which output a backtrace. 
Using these tools I've gotten
by without a debugger on large projects.

-Chris



On Apr 16, 2012, at 4:29 PM, Alan Chandler wrote:

> I have just had a frustrating few days trying, and failing to set up a 
> debugging session with a php based web app.
> 
> My setup is a yii based application, but with the framework sitting in a 
> separate directory since (supposidely) the only file you actually have to 
> expose to the web space is the index.php as the base url.
> 
> So my document root is at ~/dev/football/app and the framework is at 
> ~/dev/yii/framework
> 
> I would like to put a breakpoint on the index.php in document root and single 
> step tracking its progress through the entire sequence.
> 
> I have tried with multiple versions of eclipse with the PDT tools and xdebug. 
>  But whatever I do I end never hitting any breakpoints (including the fact 
> that it says break before the first line).
> 
> I have tried with kdevelop and the kdevelop-php plugin.  I got it running 
> once, but now It crashes before it even loads.
> 
> I have tried with phpstorm, but it seems to need the entire php code within 
> the web space, and doesn't allow for document root somewhere inside the 
> directory hierarchy (at least i can't find a way to set it up).
> 
> debian doesn't seem to support the potential addings to vim and emacs.
> 
> What do others use?
> 
> 
> -- 
> Alan Chandler
> http://www.chandlerfamily.org.uk
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject 
> of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
> Archive: http://lists.debian.org/4f8cab55.5060...@chandlerfamily.org.uk
> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to