本文介紹了XDebug 無法連接到客戶端的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
我正在嘗試在本地使用 NetBeans Mac 進行調試.
I am trying to debug with NetBeans Mac locally.
這是我的 php.ini
This is my php.ini
[xdebug]
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=1
xdebug.remote_log="/Applications/MAMP/logs/xdebug.log"
xdebug.idekey="netbeans-xdebug"
zend_extension="/Applications/MAMP/bin/php/php5.4.10/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
這是我在 xdebug.log 中得到的
This is what I had been getting in xdebug.log
I: Connecting to configured address/port: localhost:9000.
E: Could not connect to client. :-(
我嘗試將端口更改為 9001 并關閉防火墻,但沒有幫助.
I try changing the port to 9001 and turn off firewall and it didn't help.
推薦答案
Xdebug 的默認端口 (9000) 與 FastCGI 沖突(Xdebug 是第一個!) - 解決方案是將其更改為另一個端口.完成后,您需要重新啟動 IDE,您還需要在其中配置新端口.您還需要重新啟動 PHP 和您的 Web 服務器.
Xdebug's default port (9000) conflicts with FastCGI (Xdebug was first!) - the solution is to change it to another port. After having done that, you need to restart your IDE where you will also need to configure the new port. You will also need to restart PHP and your Web Server.
這篇關于XDebug 無法連接到客戶端的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!