【Vegas原创】Eclipce配置PHP & XDebug
环境:PHP532 WindowsXP
PHP配置:
1,安装jdk(jdk-1_5_0_22-windows-i586-p.exe),Eclipse(eclipse-php-galileo-SR2-win32.zip)
2,选择Eclipse的默认目录为:D:\WorkSpace
3,新建一个test的php project:
4,新建一个php文件,写入:
phpinfo();
<?php
?>
5, apache设置虚拟目录:
Alias /Test "D:\workspace\Test"
<Directory "D:\workspace\Test">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
6,run as PHP WebPage,OK了:
xdebug配置:
1, 打开:http://www.xdebug.com/ –》documentation-》Installation-》these instructions
2,将phpinfo()的全部内容粘上去 -》点击analysis phpinfo()按钮
3, 按照下面的步骤进行配置:
- Download php_xdebug-2.1.0RC1-5.3-vc6.dll
- Move the downloaded file to D:\php\ext
- Update
D:\php\php.ini
and change the linezend_extension = D:\php\ext\php_xdebug-2.1.0RC1-5.3-vc6.dll
- Restart the webserver
4, 把php.ini最后一行加入:
xdebug.remote_enable=1
5, 在Eclipse->Window->PHP->Debug,按下图进行修改:
1)php debugger选择XDebug;
2)确认Server是否正确;
3)php Executable,选择php.exe和php.ini的路径、PHP Debugger选择XDebug
6, Exclipce-> youname.php –>Debug as –> Debug Configuration,确定PHP Script和PHP Web Page的子列表是空的。【若之前自己已经玩debug,会默认成Zend Debugger,导致无法进行Debug错误】