Aptana 3 + XDebug 调试 PHP

来源:互联网 发布:网络销售属于什么行业 编辑:程序博客网 时间:2024/06/01 10:52
Aptana 3 + XDebug 调试 PHP
首先 把 Aptana 升级 到最新版。

 1. 到 http://xdebug.org/download.php下载 XDebug, 按PHP版本 、 线程安全(TS) thread safe类型、操作系统类型找到要下载的相应     XDebug版本

2. 把下载的文件放到 PHP安装目录下的 ext文件夹中。

3.编辑 php.ini

[XDebug]
; Only Zend OR (!) XDebug
zend_extension="X:/ wamp/php\ext\php_xdebug.dll"
;是否开启自动跟踪
xdebug.auto_trace= On
;是否开启异常跟踪
xdebug.show_exception_trace= On
;是否开启远程调试自动启动
xdebug.remote_autostart= On
;是否开启远程调试
xdebug.remote_enable= On
;允许调试的客户端IP
xdebug.remote_host=localhost
;远程调试的端口(默认9000)
xdebug.remote_port=9000
;调试插件dbgp
xdebug.remote_handler=dbgp
;是否收集变量
xdebug.collect_vars= On
;是否收集返回值
xdebug.collect_return= On
;是否收集参数
xdebug.collect_params= On
;跟踪输出路径
xdebug.trace_output_dir="d:\xdebug"
;是否开启调试内容
xdebug.profiler_enable=On
;调试输出路径
xdebug.profiler_output_dir="d:\xdebug"

4. 在Aptana 中 ,点 Window-> Preferences->PHP Interprete, 点 “Add”
本地图片,请重新上传
图片

5. 在Aptana 中 ,点 Window-> Preferences->PHP->Debug
图片

选中 Installed Debugger 中的 “XDebug” ,点 “Configure”
图片

6. 在Aptana 中 ,点 Window-> Preferences->Aptana Studio->Web Server, 点“New”
图片

7. 在Aptana 中 ,点 Run-> Debug Configuration, 在 PHP Web Page上 点右键 ,选 “New”
图片

8.在Aptana 中 ,点 Run-> Debug As-> PHP Web Page 开始调试