After reading my buddy’s blog (http://blog.tvlgiao.com/) about the PHPEclipse, I decided to give it a shot. I’ve been using the Zend IDE because I love the intellisense feature (a.k.a. auto-complete) of this nice IDE. The only thing is that it’s very slow to start and I had a hard time installing the debugger. Well, now the PHPEclipse package also provides the same functionalities with a complete debugger for FREE.
This is the first time I try Eclipse. My impression: impressive! The IDE loads faster than the Zend 5.1.0 IDE, eventhough both run on Java VM. The GUI of Eclipse is also slicker and it gives me the feeling of working in Visual Studio again. Installing the PHPEclipse was a breeze via the Find & Install featured under the Software Update menu. However, installing the php_dbg with Xampp wasn’t that straightforward.
At the time of writing, the php_dbg.dll is only available upto PHP engine version 5.1.2. The newest Xampp is 1.5.4, which bundles the PHP version 5.1.4. I would recommend you to install the older version of Xampp instead. Xampp 1.5.2 is the one with the correct PHP engine to work with php_dbg.
First of all, copy the php_dbg.dll-5.1.2 to the [installed xampp’s dir]/php/ext/. Then add the following lines to the php.ini file. the php.ini file that Xampp’s Apache is using is in the [installed xampp’s dir]/apache/bin/php.ini. You can see the actual path if you do a quick phpinfo().
[debugger] extension=php_dbg.dll debugger.enabled = true debugger.profiler_enabled = true debugger.JIT_host = clienthost debugger.JIT_port = 7869
However, the default configuration of the php.ini will crash your Apache because of the loaded ZendExtensionManager.dll. What I did to solve the problem was to comment out the zend_extension_ts lines towards the end of the php.ini file like this…
;zend_extension_ts = "I:\Program Files\xampp\php\zendOptimizer\lib\ZendExtensionManager.dll" ;zend_extension_manager.optimizer_ts = "I:\Program Files\xampp\php\zendOptimizer\lib\Optimizer" ;zend_optimizer.enable_loader = 0 ;zend_optimizer.optimization_level=15 ;zend_optimizer.license_path = ; Local Variables: ; tab-width: 4 ; End:
After all the zend_ lines have been commented out, Apache started just fine and the phpinfo() dump confirmed that the php_dbg has been loaded.
Hope this help. Now it’s time to do some serious php apps with PHPEclipse. Ah by the way, CakePHP with PHPEclips is beautiful! We now have full code auto-complete for the CakePHP’s library! How amazing! And my friend Giao has just told me that Jseclipse for Javascript now support autocomplete for OOP-JS (prototypes and all that good stuff). Ha, it looks like that I’m hooked with Eclipse already.
I have all done
It seems work but the variables does not display
Do you have an explication
thanks i apologize for my english i’m french
I have this on my phpinfo()
DBG php debugger, version 2.13.1, Copyright 2001, 2006, Dmitri Dmitrienko, http://www.nusphere.com
Version 2.13.1
Linked as a shared library.
Profiler compiled, enabled
Directive Local Value Master Value
debugger.enable_session_cookie On On
debugger.enabled On On
debugger.fail_silently On On
debugger.ignore_nops Off Off
debugger.JIT_enabled Off Off
debugger.JIT_host clienthost clienthost
debugger.JIT_level 3 3
debugger.JIT_port 7869 7869
debugger.profiler_enabled On On
debugger.session_nocache On On
debugger.timeout_seconds 300 300