到http://downloads.zend.com/pdt/server-debugger下載最新的debuggerphp
1、請將ZendDebugger.dll複製到您的php安裝目錄下,好比:你的php根目錄/ext/web
2、而後將下面的4行內容加到您的php.ini:apache
[Zend]安全
zend_extension_ts=C:/wamp/bin/php/php5.2.9-2/ZendDebugger.dllide
;此處ts代理線程安全測試
zend_debugger.allow_hosts=127.0.0.1spa
zend_debugger.expose_remotely=always線程
其中,127.0.0.1是遠程調試的文件所在機器的IP;我是本地web調試debug
3、將dummy.php複製到apache的document root目錄。代理
4、重啓apache。
5.到Zend Studio的Tools->preferences->debug下覈對一下設置是正確的
6.測試Debugger是否成功
「A timeout occurred when the debug server attempter to connect to the following client hosts/IPS」
因此注意了:若是你的php版本是5.3以上,且是thread safe的,那麼不要浪費你的時間作嘗試,建議你直接改用XDebug吧。如下官方給出的解釋。
The Debugger we provide supports only the non-thread-safe architecture, that is why it does not load in your configuration.
Zend stopped supporting the thread safe architecture when Microsoft also decided to implement its PHP engine with the fast-cgi architecture which means non-thread-safe.
Best regards,
Massi.
到http://xdebug.org/download.php選擇本身須要的xdebug版本。
下載並解壓到本身須要的位置。
在php.ini中加入
zend_extension_ts="你的php根目錄/ext/php_xdebug.dll" |
若是不行改用
zend_extension="你的php根目錄/ext/php_xdebug.dll" |
而後重啓apache經過phpinfo()輸出並查找xdebug是否被成功加載。
在php.ini中加入
;開啓自動跟蹤 |
|
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="e:/xampp/temp" |
|
xdebug.profiler_enable=On |
xdebug.profiler_output_dir=" e:/xampp/temp" |
|
xdebug.remote_host=localhost |
|
xdebug.remote_port=9000 |
xdebug.remote_handler=dbgp |