eclipse php 插件(http://wiki.eclipse.org/PDT/Installation):
http://download.eclipse.org/tools/pdt/updates/2.2/milestones
-----------------------------------------------------------------------------------------
http://www.wenhq.com/article/view_635.html
软件开发的断点调试是必不可少,这里介绍ubuntu10.04中eclipse工具中php的调试配置。
本打算配置ZendDebugger 进行调试,配置了老长时间没配置成功,在phpinfo看不到ZendDebugger生效,经查发现是php5.3的问题,必须先卸载,本文介绍使用xdebug了。
软件安装太简单了,分别执行如下命令:
sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install php5-cli
sudo apt-get install php5-xdebug
php的配置:
php.ini在/etc/php5/下的几个文件夹里,应该有三个文件夹:apache2、cli、conf.d,我们应该修改apache2和cli 下的php.ini. 在conf.d下有一个xdebug.ini文件,记录了xdebug的文件路径。
sudo gedit /etc/php5/apache2/php.ini
sudo gedit /etc/php5/cli/php.ini
用超级用户权限分别打开上面说的两个php.ini,添加如下代码
;xdebug配置
[Xdebug]
xdebug.remote_enable = 1
xdebug_remote_host = “localhost”
xdebug.remote_port = 9000
xdebug.remote_handler = “dbgp”
zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so
;开启自动跟踪
xdebug.auto_trace = On
;开启异常跟踪
xdebug.show_exception_trace = On
;开启远程调试自动启动
xdebug.remote_autostart = On
;开启远程调试
xdebug.remote_enable = On
;收集变量
xdebug.collect_vars = On
;收集返回值
xdebug.collect_return = On
;收集参数
xdebug.collect_params = On
xdebug.collect_assignments = On
--------------------------------------------------------------------------------------
http://techmania.wordpress.com/2008/07/02/debugging-php-in-eclipse-using-xdebug/
在xdebug.ini中添加下列配置:
sudo gedit /etc/php5/conf.d/xdebug.ini
xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
重新启动apache:sudo /etc/init.d/apache2 restart
--------------------------------------------------------------------------------------
http://www.txstudy.com/wap.aspx?nid=2638&cid=11&sp=386
配制eclipse的浏览器
打开eclipse,找到window->preferences->general->web browser,看一下有没浏览器,没有就添加一下,当然是firefox
配制运行及调试选项
window->preferences->PHP->>php executables->add->设置如下
php5/usr/bin/php5 (注意这里要选择php5,不要是php,因为我们安装的是php5-xdebug)
继续配制debug(麻烦啊)
window->preferences->PHP->run/debug->perspectives->可以找到php script和php web page,分别设置他们的debug,及运行程序。
建立PHP脚本后,最后调试运行
打开Run->Open Debug Dialog ,选择调试所需要用的名称和环境,仔细看一下,应该没问题。
然后就可以单步调试了
分享到:
相关推荐
1、基于linux ubuntu 系统的网络调试助手 可以进行UDP通讯,可做TCP客户端,TCP服务器。十六进制和ASCII 传送接收数据; 2、内附安装说明
linux安装ubuntu实验报告_安装教程.docx
酷狗音乐linux版本还未出现,现在使用的是web版,具体安装如下: 先安装预装软件:命令 sudo apt-get install python-gtk2 python-webkit 再下载安装包即可。
本文介绍了Ubuntu Linux系统上安装IE浏览器的方法。
linux/Ubuntu离线安装7z工具,解压 后make ,在bin目录生成执行文件
ubuntu上的网络调试助手, 挺好用的
linux Ubuntu中怎么安装五笔.txt
类似串口调试助手,用于Ubuntu连接串口
Ubuntu安装jdk环境 Ubuntu安装jdk环境 Ubuntu安装jdk环境
详细讲解Ubuntu安装过程 以及arm_linux 环境的搭建,包含Ubuntu系统的基本操作指令
红联linux的Ubuntu-Linux图解安装教程,
Ubuntu22.04安装教程以及Ubuntu下C++环境配置
Ubuntu下网络调试助手
linux/ubuntu下的飞信安装文件1.3
Ubuntu简明安装手册
dnw_linux Ubuntu下安装dnw dnw_linux Ubuntu下安装dnw
Ubuntu下LAMP(linux+apache+mysql+php)环境的配置与安装.pdf
linux Ubuntu下安装 Source insight
linux Ubuntu 中文参考手册 中文教程