采用 xdebug
install.后两项命令执行的时候,可能会需要sudo权限,因为涉及到将程序文件复制到系统目录.
代码如下:
[xdebug]
xdebug.remote_handler=dbgp
xdebug.auto_trace=on
xdebug.collect_params=on
xdebug.collect_return=on
xdebug.max_nestring_level=100
xdebug.profile_enable=on
xdebug.remote_enable=on
xdebug.remote_host=localhost
xdebug.trace_output_dir="/tmp"
xdebug.profile_output_dir="/tmp"
xdebug.idekey=webide
xdebug.mode=re
放到这个目录中的ini文件会被php自动加载.
至此,xdebug的安装配置已经完成.
先配置debug,选择php选择debug,将php的debugger选择为xDebug.接着配置Server,
选择PHP
然后设置成default.
最后配置PHP
Executables,add 随便起个名字,path设置成/usr/bin/php
最后将PHP debugger设置成为XDebug就可以了.
[Xdebug]
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.trace_output_dir="D:/xDebugLog"
xdebug.profiler_output_dir="D:/xDebugLog"
xdebug.profiler_enable=On
这里要特别注意:如果在文件里有其他的zend_extension_ts,需要注释掉,否则apache无法启动.
第四步:启动apache.
第五步:在eclipse的项目里的Properties里面找到"PHP Debug",在PHP Debugger里面选择"XDebug"
第六步:再在Windows-Preferences里面配置下PHP Servers
第七步:再在Windows-Preferences里面配置下PHP Executables
第八步:再在Run-Debug Configurations里面确认Path Mapping的配置和第六步中的一致.
此时此刻呢,进入debug界面,就可以开始设置断点进行debug了.
笔者刚刚接触PHP-Eclipse,今天刚把debug PHP的方法弄好,发出来与大家共享一下.
[xhtml] view plaincopyprint?
xdebug.remote_handler = dbgp
xdebug.profiler_enable = on
再配置一下:
人们花那么大力气搞出来你居然困扰的自动完成功能,你必须是一个高手......
顶部的菜单栏窗口 - 喜好
说,我不如何使用Eclipse来编写PHP,感觉太笨重
以上就是土嘎嘎小编为大家整理的关于phpxdebugeclipse的信息相关主题介绍,如果您觉得小编更新的文章只要能对粉丝们有用,就是我们最大的鼓励和动力,不要忘记讲本站分享给您身边的朋友哦!!