Tweet about this on TwitterShare on FacebookShare on Google+Share on StumbleUponShare on TumblrShare on RedditPin on PinterestEmail this to someone

Recently I wanted to use PDT to try out PHP development, first thing in any language is to get familiarised with debugging which is the most important functionality required by any IDE. After struggling little bit I was able to configure PDT and PHP configurations to work it properly. Then I started with sample file to check the flow. What I realised is PDT debugging expressions window doesn’t show local variables. This is not good at all. Then I did search the internet and few forums have mentioned to update the XDebug to latest version.  I did it. Now my PHP.ini file entry is like this.

zend_extension = C:\xampp\php\ext\php_xdebug-2.1.0-5.3-vc6.dll

Now everything started working, but after a while it started giving me an error saying “Unexpected termination of debugging” message. Again after searching everywhere I found that this could happen if you have watch items in your Expressions window. So it should be cleared before starting new debug session. In my case actually there were no items in Expression window but it was not visible at all, so thought of making it visible by Window->Show Window->Expressions. Great it started working again and now I can see my local variables as well.

Not again!!!, It fails again and IDE not getting attached to the server. By experience with last couple of hours I knew that debug dll reference was there initially somehow makes PDT to attach and letting you stepping though, only issue was not showing you the local variables. So I thought of giving a try by reverting back to previous dll reference by changing PHP.ini entry as follows

zend_extension = “C:\xampp\php\ext\php_xdebug.dll”

Then again PDT started working and allow me to debug, yes you still can’t see local variables, then I again changed the entry to latest one, and PDT started working with full functionality.

I still couldn’t figure out why it loses the grip time to time,  but I suspect this happened if your application crashes at least one time due to error in your code, like accessing null value or so. Still keeping eye on this, its just two days that I started working with PHP and PDT, so need to more experience to guess what the actual issue.

Tweet about this on TwitterShare on FacebookShare on Google+Share on StumbleUponShare on TumblrShare on RedditPin on PinterestEmail this to someone