天天看點

Zend Studio之調試Xdebug

注意:xdebug版本要支援PHP版本,不然就game over了,可以在phpinfo()中檢視Xdebug是否安裝成功

<a href="http://blog.163.com/lvshutao@126/blog/static/1646374672013414113019765/" target="_blank">eclipse + xdebug</a>

一、在php.ini配置調試資訊(如果安裝了zend debugger要注釋掉其資訊)

; XDEBUG Extension

zend_extension = “D:/Web/wamp/bin/php/php5.3.8/zend_ext/php_xdebug-2.1.2-5.3-vc9-x86_64.dll”(注意中文字元,注意修改)

[xdebug]

; 開啟自動跟蹤

xdebug.auto_trace = On

xdebug.show_exception_trace = On

;xdebug.remote_autostart = On

xdebug.collect_vars = On

xdebug.collect_return = On

xdebug.collect_params = On

xdebug.trace_output_dir=”D:/Web/wamp/tmp”

xdebug.profiler_enable=On

xdebug.profiler_output_dir=”D:/Web/wamp/tmp”

xdebug.remote_enable = true

xdebug.remote_host=127.0.0.1

xdebug.remote_port=9000

xdebug.remote_handler=dbgp

xdebug.profiler_enable = off

xdebug.profiler_enable_trigger = off

xdebug.profiler_output_name = cachegrind.out.%t.%p

xdebug.profiler_output_dir = “D:/Web/wamp/tmp”

2.在zend Stuido中配置xdebug

視窗 - 首選項 - PHP - Debug,将PHP Debugger 設定為Xdebug

3.在需要調試的檔案上右鍵

打開調試視窗

 再按調試就OK了

———————————-

所有的調試伺服器配置都可以在 “視窗” -&gt; “首選項” -&gt; “PHP Servers” 中檢視編輯

Edit Server

Base URL:http://localhost

Local Web Root:D:\Web\wamp\www

Add new server path map

Path on Server:http://localhost/pro/ThinkPHP3 或者實體位址

path in Workspace: /ThinkPHP3

最後一點,不要忘記在調試時啟用單步執行過濾器哦,不然zend studio在用 xdebug 調試時可能就直接運作到結果

本文轉自ljianbing51CTO部落格,原文連結:http://blog.51cto.com/ljianbing/1604710 ,如需轉載請自行聯系原作者