1. 下載XDebug: http://www.xdebug.org/download.php 經過phpinfo()查看你的php版本,如今相對應的dll文件php
2. 找到php.ini
再最後邊 加入 XDebug 配置:
zend_extension="D:\php\ext\php_xdebug-2.1.0-5.3-vc6.dll"
xdebug.auto_trace = On
;是否開啓異常跟蹤
xdebug.show_exception_trace = On
;是否開啓遠程調試自動啓動
xdebug.remote_autostart = Off
;是否開啓遠程調試
xdebug.remote_enable = On
;容許調試的客戶端IP
xdebug.remote_host=127.0.0.1
;遠程調試的端口(默認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="e:/temp/xdebug"
;是否開啓調試內容
xdebug.profiler_enable=On
;調試輸出路徑
xdebug.profiler_output_dir="e:/temp/xdebug"
而後保存。注意:保存完後,要將php.ini 拷貝一份覆蓋c:\windows\下的php.ini
5. 重啓 Apache windows
六、查看phpinfo(),你會看到裏邊有xdebug的信息spa
七、zend studio配置插件
首選項中的Debug配置爲XDebug(同項目配置)debug
同時 項目-》屬性配置Xdebug調試
5.接下來能夠運行項目進行調試了blog
Debug Configurations可經過三種方式進入:一、右擊須要調試的PHP文件,選擇Debug As或者打開調試的PHP文件;二、選擇菜單欄上Run菜單下的Debug As進入;三、點擊菜單欄Run菜單下方小蜘蛛圖標旁的向下箭頭選擇Debug Configurations。rem