1. 到 http://xdebug.org/download.php下载 XDebug, 按PHP版本 、 线程安全(TS: thread safe类型)、操作系统类型找到要下载的相应XDebug版本。
2. 把下载的文件放到 PHP安装目录下的 ext文件夹中。
3.编辑 php.ini,加入以下参数配置xdebug。

[XDebug]
; Only Zend OR (!) XDebug
zend_extension="c:\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="c:\php\xdebug"
;是否开启调试内容
xdebug.profiler_enable=On
;调试输出路径
xdebug.profiler_output_dir="c:\php\xdebug"

4. 在Aptana 中 ,点 Window-> Preferences-> Aptana Stu­dio -> Edi­tors -> PHP ->PHP Interprete, 点 “Add”并填写如下图信息:



5.重启apache,安装完成。可以通过查看phpinfo信息确定xdebug是否集成到了php环境中,出现如下内容,代表xdebug可以在php中使用了:

 

6. 在Aptana 中 ,点 Run-> Debug As-> PHP Server 开始调试。