Eclipse集成PDT+XDebug调试PHP脚本 https://svn.jcxsoftware.com/node?page=5 [转]
2014-03-27 14:02
127 查看
win7+xampp-win32-1.8.2-2-VC9+eclipse-jee-indigo-SR2-win32-x86_64.zip
http://pjdong1990.iteye.com/blog/1610305
http://pan.baidu.com/share/link?shareid=2741342437&uk=571615461&fid=943296216
搭建 Xampp + Eclipse PDT + XDebug 的PHP调试环境
,如果你机器没有JRE,来JAVA的官方网站下载JRE,安装,因为Eclipse需要JRE才能运行。
2,下载Eclipse PDT,直接下载下面的那个3.0.x版本的All in one windows安装包。直接运行eclipse就可以启动。
3,下载XAMPP这个集成的PHP+MySql运行环境。
[XDebug]
zend_extension = "E:\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_append = 1
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = "E:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = dbgp
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 19000
xdebug.remote_autostart = 1
xdebug.overload_var_dump = 1
xdebug.var_display_max_children = 1024
xdebug.var_display_max_data = 2048
xdebug.var_display_max_depth = 10
xdebug.auto_trace = 1
xdebug.show_exception_trace = 1
xdebug.collect_vars = 1
xdebug.collect_return = 1
xdebug.collect_params = 1
4,在c:\xampp\php\php.ini文件里面去掉XDebug的注释,并把所有0改为1
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_append = 1
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.trace_output_dir = "C:\xampp\tmp"
5,Eclipse的配置。
依次打开Windows -> Preferences -> PHP ->PHP Executables 加入XDebug
依次打开Windows -> Preferences -> PHP ->Debug,配置如下
然后在debug configuration 里面配置如下:
下面调试成功后的界面如下所示:
如果以上不能解决问题,有可能是网上说的端口被占用的原因,网上给出的解决方案是:
1)修改php.ini
xdebug.remote_port=9001 ;反向连接zend studio使用的端口
2) 修改zend studio 的XDebug反向链接端口
Window -> Preferences -> PHP -> Debug -> Installed Debuggers
注意:svn接口换成svnkit的,JNI接口不稳定。
http://pjdong1990.iteye.com/blog/1610305
http://pan.baidu.com/share/link?shareid=2741342437&uk=571615461&fid=943296216
搭建 Xampp + Eclipse PDT + XDebug 的PHP调试环境
,如果你机器没有JRE,来JAVA的官方网站下载JRE,安装,因为Eclipse需要JRE才能运行。
2,下载Eclipse PDT,直接下载下面的那个3.0.x版本的All in one windows安装包。直接运行eclipse就可以启动。
3,下载XAMPP这个集成的PHP+MySql运行环境。
[XDebug]
zend_extension = "E:\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_append = 1
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = "E:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = dbgp
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 19000
xdebug.remote_autostart = 1
xdebug.overload_var_dump = 1
xdebug.var_display_max_children = 1024
xdebug.var_display_max_data = 2048
xdebug.var_display_max_depth = 10
xdebug.auto_trace = 1
xdebug.show_exception_trace = 1
xdebug.collect_vars = 1
xdebug.collect_return = 1
xdebug.collect_params = 1
4,在c:\xampp\php\php.ini文件里面去掉XDebug的注释,并把所有0改为1
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_append = 1
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.trace_output_dir = "C:\xampp\tmp"
5,Eclipse的配置。
依次打开Windows -> Preferences -> PHP ->PHP Executables 加入XDebug
依次打开Windows -> Preferences -> PHP ->Debug,配置如下
然后在debug configuration 里面配置如下:
下面调试成功后的界面如下所示:
如果以上不能解决问题,有可能是网上说的端口被占用的原因,网上给出的解决方案是:
1)修改php.ini
xdebug.remote_port=9001 ;反向连接zend studio使用的端口
2) 修改zend studio 的XDebug反向链接端口
Window -> Preferences -> PHP -> Debug -> Installed Debuggers
注意:svn接口换成svnkit的,JNI接口不稳定。
相关文章推荐
- Eclipse集成PDT+XDebug调试PHP脚本
- Eclipse集成PDT+XDebug调试PHP脚本
- PHP xdebug eclipse subversion SVN phpunit xmapp 企业级团队开发环境搭建 集成单元测试 花样调试 版本控制 张迅雷原创 欢迎转载
- PHP xdebug eclipse subversion SVN phpunit xmapp 企业级团队开发环境搭建 集成单元测试 花样调试 版本控制 张迅雷原创 欢迎转载
- 继续摘抄:用eclipse+pdt+xdebug+php+apache 配制php脚本和网页的开发环境
- xampp,Eclipse,pdt,xdebug构建php的调试环境
- Win7下php环境搭建2:WAMP+Eclipse PDT+XDebug+SVN
- eclipse php luna(4.4.2) + apache(2.4.12) + php(5.6.8) + xdebug(2.3.2) + svn(1.8.2)
- eclipse+php插件+Xdebug搭建php调试环境
- Xdebug + Eclipse 单步跟踪调试PHP代码
- Eclipse for php + Xdebug搭建PHP的调试环境
- 史上最佳 Mac+PhpStorm+XAMPP+Xdebug 集成开发和断点调试环境的配置
- Eclipse+PDT使用Zend Debugger来调试php程序的步骤
- PHP 开发环境搭建( Eclipse PDT XAMPP XDEBUG)
- PHPEclipse + XDebug+ APMServ5.26现实PHP调试的方法
- Eclipse for php + Xdebug搭建PHP的调试环境
- 使用xampp和xdebug,加上eclipse-php对程序进行调试
- Ubuntu 下搭建Eclipse PDT实现php的单步调试的功能
- xdebug调试 php文章汇总(NotePad++,NetBeans IDE,Eclipse,wincachegrind,komodo)