【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:

image

4,新建一个php文件,写入:

phpinfo();
<?php
?>

image

 

 

5, apache设置虚拟目录:

Alias /Test "D:\workspace\Test"
<Directory "D:\workspace\Test">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

image

6,run as PHP WebPage,OK了:

image

 

xdebug配置:

1, 打开:http://www.xdebug.com/ –》documentation-》Installation-》these instructions 

image 

 

2,将phpinfo()的全部内容粘上去 -》点击analysis phpinfo()按钮

 

3, 按照下面的步骤进行配置:

image

  • 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 line
    zend_extension = D:\php\ext\php_xdebug-2.1.0RC1-5.3-vc6.dll
  • Restart the webserver

     

    4, 把php.ini最后一行加入:

    xdebug.remote_enable=1

    image

     

    5, 在Eclipse->Window->PHP->Debug,按下图进行修改:

    1)php debugger选择XDebug;

    2)确认Server是否正确;

    3)php Executable,选择php.exe和php.ini的路径、PHP Debugger选择XDebug

    image

     

    image

     

    6, Exclipce-> youname.php –>Debug as –> Debug Configuration,确定PHP Script和PHP Web Page的子列表是空的。【若之前自己已经玩debug,会默认成Zend Debugger,导致无法进行Debug错误】

posted @ 2010-06-10 15:40  李济宏(Amadeus)  阅读(207)  评论(0编辑  收藏  举报