Install XDebug
1. Go to http://www.xdebug.org/; download Xdebug (version 2.0.3 at the time of this writing).
2. Put php_xdebug-2.0.3-5.2.5.dll you just downloaded to some folder; Add the following line tophp.ini file so that PHP can load it:
You may need to change the “zend_extension_ts” to “zend_extension” if you are using the non thread safe version of PHP or to “zend_extension_debug” if you are using the debug version. This information can be found by running phpinfo() and locate the following section:
Debug Build => no
Thread Safety => enabled
3. Testing XDebug is installed correctly by Call phpinfo() function in a page, or run this:
php -m
You should be able to see a section for XDebug if successfully installed.
Configure PDT to Use XDebug
1. Configure PHP Executables in
Windows > Preference > PHP > Debug.
![](https://i-blog.csdnimg.cn/blog_migrate/e785db4bb2b6d5d8abaff4492f487ba4.png)
2. Configure PHP Server for debugging Web Pages. (You can refer to the "Add Virtual Host" of the part 1, which configures the current project to be a Virtual Host.)
![](https://i-blog.csdnimg.cn/blog_migrate/7a13b5d3e067a50afb0be31c13cda54e.png)
3. Configure the default debug settings to use XDebug.
![](https://i-blog.csdnimg.cn/blog_migrate/d72722e00b3a53419e64acef2b016c59.png)
4. Next we configure the debug settings for the current project. First go to
Run > Open Debug Dialog...
5. Next we create a new PHP Script configuration.
6. Then we create a configuration for debugging PHP Web Page.
![](https://i-blog.csdnimg.cn/blog_migrate/6a421dc4cebd2f7fcceed042b95553c5.png)
7. Now create some test php script/pages, click on the "Debug" button to start debugging.
Reference
XDebug Guide
http://www.eclipse.org/pdt/documents/XDebugGuide.pdf
How To Setup a Free PHP Debugger using Eclipse PDT + XDebug
http://robsnotebook.com/php_debugger_pdt_xdebug
Debugging PHP applications with xdebug
http://devzone.zend.com/article/2930-Debugging-PHP-applications-with-xdebug
Debugging PHP using Eclipse PDT + Zend Debugger / Xdebug
http://www.ibm.com/developerworks/edu/os-dw-os-php-eclipse-pdt-debug.html
Debugging PHP Applications with Xdebug and Eclipse PDT
http://www.64bitjungle.com/tech/debugging-php-applications-with-xdebug-and-eclipse-pdt/
Squash bugs in PHP applications with Xdebug
http://www.ibm.com/developerworks/opensource/library/os-php-xdebug/?S_TACT=105AGX44&S_CMP=TUT
1. Go to http://www.xdebug.org/; download Xdebug (version 2.0.3 at the time of this writing).
2. Put php_xdebug-2.0.3-5.2.5.dll you just downloaded to some folder; Add the following line tophp.ini file so that PHP can load it:
[xdebug]
zend_extension_ts="D:/Program Files/PHP5.2/modules/php_xdebug-2.0.3-5.2.5.dll"
xdebug.remote_enable=On
xdebug.remote_host="127.0.0.1"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.remote_log="d:/xdebug.log"
Ensure you place your entries at the bottom of your php.ini file or XDebug could fail to load.zend_extension_ts="D:/Program Files/PHP5.2/modules/php_xdebug-2.0.3-5.2.5.dll"
xdebug.remote_enable=On
xdebug.remote_host="127.0.0.1"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.remote_log="d:/xdebug.log"
You may need to change the “zend_extension_ts” to “zend_extension” if you are using the non thread safe version of PHP or to “zend_extension_debug” if you are using the debug version. This information can be found by running phpinfo() and locate the following section:
Debug Build => no
Thread Safety => enabled
3. Testing XDebug is installed correctly by Call phpinfo() function in a page, or run this:
php -m
You should be able to see a section for XDebug if successfully installed.
Configure PDT to Use XDebug
1. Configure PHP Executables in
Windows > Preference > PHP > Debug.
![](https://i-blog.csdnimg.cn/blog_migrate/e785db4bb2b6d5d8abaff4492f487ba4.png)
2. Configure PHP Server for debugging Web Pages. (You can refer to the "Add Virtual Host" of the part 1, which configures the current project to be a Virtual Host.)
![](https://i-blog.csdnimg.cn/blog_migrate/7a13b5d3e067a50afb0be31c13cda54e.png)
3. Configure the default debug settings to use XDebug.
![](https://i-blog.csdnimg.cn/blog_migrate/d72722e00b3a53419e64acef2b016c59.png)
4. Next we configure the debug settings for the current project. First go to
Run > Open Debug Dialog...
5. Next we create a new PHP Script configuration.
![](https://i-blog.csdnimg.cn/blog_migrate/1c8e98ee5583d842930e88af2d685377.png)
6. Then we create a configuration for debugging PHP Web Page.
![](https://i-blog.csdnimg.cn/blog_migrate/6a421dc4cebd2f7fcceed042b95553c5.png)
7. Now create some test php script/pages, click on the "Debug" button to start debugging.
Reference
XDebug Guide
http://www.eclipse.org/pdt/documents/XDebugGuide.pdf
How To Setup a Free PHP Debugger using Eclipse PDT + XDebug
http://robsnotebook.com/php_debugger_pdt_xdebug
Debugging PHP applications with xdebug
http://devzone.zend.com/article/2930-Debugging-PHP-applications-with-xdebug
Debugging PHP using Eclipse PDT + Zend Debugger / Xdebug
http://www.ibm.com/developerworks/edu/os-dw-os-php-eclipse-pdt-debug.html
Debugging PHP Applications with Xdebug and Eclipse PDT
http://www.64bitjungle.com/tech/debugging-php-applications-with-xdebug-and-eclipse-pdt/
Squash bugs in PHP applications with Xdebug
http://www.ibm.com/developerworks/opensource/library/os-php-xdebug/?S_TACT=105AGX44&S_CMP=TUT