我使用PHPStorm並試圖根據此視頻https://laracasts.com/series/how-to-be-awesome-in-phpstorm/episodes/20?autoplay=true運行Xdebug。使用設置Xdebug和PHPStorm進行調試
第一部分完美工作(https://laracasts.com/series/how-to-be-awesome-in-phpstorm/episodes/19?autoplay=true),但我卡在第二個。
端口9000是行不通的,所以我改成了10000
我配置PHP Web應用程序配置
後,我按調試按鈕,網頁是空白
an d仍在加載,PHPStorm正在等待傳入連接。
我已籤 「可以接受外部連接」 在PHP - 調試 - 在配置這樣的php.ini的Xdebug和Xdebug:
[XDebug]
zend_extension="/usr/local/Cellar/php56-xdebug/2.3.3/xdebug.so"
xdebug.remote_enable = 1
xdebug.cli_color = 1
xdebug.show_local_vars = 1
xdebug.remote_port = 10000
xdebug.remote_host= localhost
xdebug.remote_autostart = 1
xdebug.remote_log="/usr/local/tmp/xdebug.log"
xdebug.idekey = "PHPSTORM"
xdebug.ide_key = "PHPSTORM"
xdebug.profiler_enable = 1
xdebug.profiler_output_dir="/usr/local/tmp/xdebug-profiler"
xdebug.profiler_enable_trigger = 1
我試圖驗證Web服務器與此結果:
我google搜索,並試圖解決這個6小時,儘量幫我請,我真的這種虛擬。
使用OS X El Capitan。
我可以調試單個腳本,但不是整個網站。
當我直接運行online-chef.dev:10000時,它說ERR_CONNECTION_REFUSED。
「online-chef.dev」位於本地虛擬主機。
我做錯了什麼?
非常感謝!
'web服務器端口'和'xdebug端口'是2個不同的東西。你在這裏把它們混在一起。我建議從頭開始:1)https://www.jetbrains.com/phpstorm/quickstart/debugger.html 2)https://confluence.jetbrains.com/display/PhpStorm/Debugging+with+PhpStorm – LazyOne
如果你將忽略這句話「當我直接運行這個..」,什麼是我的配置不好? –
您已將xdebug配置爲使用與您的Web服務器相同的10000端口。這是明顯的錯誤 - 它不這樣工作。當xdebug收到調試請求時,使用你的配置,它會嘗試連接到Web服務器(端口)而不是IDE。是的 - 它是連接到IDE(調試客戶端)而不是其他方式的xdebug。 – LazyOne