2015-11-29 56 views
1

我想設置xdebug,以便我可以調試我的php wordpress項目。我正在使用MAMP運行該項目,並在php.ini文件中配置了xdebug,如下所示。Netbeans未連接到MAMP上的xdebug,顯示「等待連接」

zend_extension="/Applications/MAMP/bin/php/php5.5.26/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so" 

debug.default_enable=1 

xdebug.remote_enable=1 
xdebug.remote_handler=dbgp 
xdebug.remote_mode=req 
xdebug.remote_host=localhost 
xdebug.idekey=「netbeans-xdebug」 
xdebug.remote_port=9001 
xdebug.remote_autostart=1 

這是工作,因爲我可以看到我的phpinfo()中的xdebug。

phpinfo

我現在想的NetBeans連接到Xdebug的,這樣我可以實際調試我的代碼。我已經指出netbeasns到了XDebug-的NetBeans在端口9001。然後我嘗試調試我的項目,但它只是卡住上

等待連接(於NetBeans的XDebug)

它已經爲我工作兩次(它進入調試模式),但點擊繼續(它停在index.php的第一行)後,它不再工作,頁面不會加載。然後我嘗試重新加載調試,但它回到等待連接。

任何想法有什麼不對?

謝謝。

回答

0

在php.ini文件

implicit_flush = On 

(默認情況下它會關閉)。

這裏PHP會告訴輸出層在每個輸出塊後自動刷新自己。

我希望這會有所幫助。