This is old version article. Pls refer to new article: http://blog.youkuaiyun.com/totogogo/archive/2010/01/06/5144987.aspx
Install
1. Install apache and php
2. Download eclipse + PDT + zend debugger all in one from http://www.zend.com/en/community/pdt
3. Check the setting in "Preferences -> PHP", such as PHP Servers, PHP Manual and Debug Node, 通常缺省的已经 OK 。 (If web server port is not 80, you need to modify the PHP Server setting.)
4. Configure Zend Debugger into PHP ( 这步重要,否则你在 debug 你的 php web page 时不会 stop at the breakpoint ) :
1) Search file “ ZendDebugger.dll ” in the eclipse (PDT) folder, you can see 2 files, copy the one in “ php5 ” folder to PHP_INSTALL_DIR/ext folder
2) copy following lines to “ php.ini ” file
zend_extension_ts=E:/develop/php/php5.2.6/ext/ZendDebugger.dll
zend_debugger.allow_hosts=127.0.0.1
zend_debugger.expose_remotely=always
Create + Run + Debug PHP in eclipse
1. Create a php project
2. Create php file
3. Two types of running & debugging php
1) right click the php file, select “Run/Debug As -> PHP Script ”
2) right click the php file, select “Run/Debug As -> PHP Web Page ”
If you run/debug php file as PHP web page first time, a window popup and ask you comfirm the URL.
If you set break point in the php file and Debug it, it will switch to debug perspective and stop on the break point.
Reference links:
https://www6.software.ibm.com/developerworks/education/os-php-eclipse-pdt-debug/section4.html
http://hi.baidu.com/momoca/blog/item/4600b600cd85e684e950cdd0.html