PHP 5.3, Netbeans 6.7, Xdebug 2.0.5 and the Case of the missing Local Variables
Hey everyone!
Very happy moment for me right now.
I've been using Netbeans to do my PHP development for quite some time now. I use Xdebug to debug my PHP applications just like you would with Java or C++ or whatever.
It works great. That is, it did until I upgraded to PHP 5.3....
All of a sudden local variables disappeared from the Variables window. You could still see Superglobals, and anything inside of an instance ($this), but no locals.
To inspect a local, you'd have to set up a watch for it. Borrrrrrring!
Some googling told me that it's a bug inside the latest stable Xdebug (2.0.5 - which is what I have). They fixed it a while ago in the HEAD (2.1 development), but since I lack the setup/initiative to compile PHP/Xdebug on my own I decided I'd search for a binary somewhere.
Eventually, after a LOT of googling, I found a precompiled .dll of Xdebug 2.1-dev!
here it is. (Originally pilfered from here). It's a zip containing the .dll for all versions of PHP supported by Xdebug and all the different build platforms (VC6/9, x86/x64). In this zip you'll find the .dll for you. Just match it to the .dll you are currently using (don't forget to back up your current .dll, and the line in your php.ini file!!!), drop it in the ext dir of your PHP install, and change the line in your php.ini, and you're off to the races! I can now see all my local variables again :)
Good luck!
Perhaps I spoke too soon... Seems that this new .dll will crash apache more often than not. It takes several tries to get apache to not die. When it works, it works. You can see all your local variables etc. When it doesn't work, it just doesn't. Kind of defeats the purpose... Maybe you'll have better luck with it.
I just ended up downgrading my PHP 5.3 to 5.2.11 (it's only for development anyway...) and 2.0.5 works fine, so there ya go.
Very happy moment for me right now.
I've been using Netbeans to do my PHP development for quite some time now. I use Xdebug to debug my PHP applications just like you would with Java or C++ or whatever.
It works great. That is, it did until I upgraded to PHP 5.3....
All of a sudden local variables disappeared from the Variables window. You could still see Superglobals, and anything inside of an instance ($this), but no locals.
To inspect a local, you'd have to set up a watch for it. Borrrrrrring!
Some googling told me that it's a bug inside the latest stable Xdebug (2.0.5 - which is what I have). They fixed it a while ago in the HEAD (2.1 development), but since I lack the setup/initiative to compile PHP/Xdebug on my own I decided I'd search for a binary somewhere.
Eventually, after a LOT of googling, I found a precompiled .dll of Xdebug 2.1-dev!
here it is. (Originally pilfered from here). It's a zip containing the .dll for all versions of PHP supported by Xdebug and all the different build platforms (VC6/9, x86/x64). In this zip you'll find the .dll for you. Just match it to the .dll you are currently using (don't forget to back up your current .dll, and the line in your php.ini file!!!), drop it in the ext dir of your PHP install, and change the line in your php.ini, and you're off to the races! I can now see all my local variables again :)
Good luck!
UPDATE
Perhaps I spoke too soon... Seems that this new .dll will crash apache more often than not. It takes several tries to get apache to not die. When it works, it works. You can see all your local variables etc. When it doesn't work, it just doesn't. Kind of defeats the purpose... Maybe you'll have better luck with it.
I just ended up downgrading my PHP 5.3 to 5.2.11 (it's only for development anyway...) and 2.0.5 works fine, so there ya go.