eclipse php插件安装的方法:首先安装eclipse;然后配置php运行环境;然后接着依次打开“Prefences→PHP→Debug”;最后打开Installed Debuggers并选择XDebug即可。
(1)配置php本地run
1.打开Prefences→PHP→PHP Executables→Execution Environments →Add
1.启动wamp,打开 PHP→php.ini 在结尾处加入 以下代码
2.重启wampzend_extension = "d:/wamp/bin/php/php5.3.13/zend_ext/php_xdebug-2.2.0-5.3-vc9.dll" [xdebug]
xdebug.profiler_enable=on
xdebug.trace_output_dir="d:/wamp/logs/xdebug-log" ;xdebug 的数据文件目录 xdebug.profiler_output_dir="d:/wamp/logs/xdebug-log" ;xdebug 的数据文件目录 xdebug.auto_trace = On ;开启自动跟踪 xdebug.show_exception_trace = On ;开启异常跟踪 xdebug.remote_autostart = On ;开启远程调试自动启动 Off 关闭远程debug可以将此项设置为Off xdebug.remote_enable = On ;开启远程调试 xdebug.remote_handler=dbgp ;用于zend studio远程调试的应用层通信协议 xdebug.remote_host=127.0.0.1 ;允许连接的zend studio的IP地址 xdebug.remote_port=9000 ;反向连接zend studio使用的端口 xdebug.collect_vars = On ;收集变量 xdebug.collect_return = On ;收集返回值 xdebug.collect_params = On ;收集参数 xdebugbug.max_nesting_level = 10000
2.打开Prefences→PHP→Debug→Installed Debuggers 选择 XDebug
在地址栏输入http://localhost/test.php eclipse中会产生断点
说明:
eclipse在选择工作空间的时候将工作空间直接选择到wamp的www目录下,
这样更加方便。