我已經遵循了這個文件:這是我的 php.ini[XDebug]zend_extension="C:\xampp\php\ext\php_xdebug.dll"xdebug.profiler_enable = 1xdebug.profiler_enable_trigger = 1xdebug.remote_enable = 1xdebug.remote_host = "localhost"xdebug.remote_handler = "dbgp"xdebug.remote_mode = "req"xdebug.remote_port = 9000我正在端口 9000 上使用 XAMPP 運行 Apache:當我這樣做時,來自 NetBeans:調試 -> 調試項目我得到以下信息:端口 9,000 已被占用。配置 IDE 以使用另一個端口?XAMPP是使用9000千端口的軟件。我需要在這里做什么?我應該將 XDebug 端口更改為 9001 嗎?工具->選項:如果我這樣做,我還需要更改 php.ini 并將 XDebug 端口更改為 9001?;蛘呶覒摾^續使用端口 9000?我進行了不同的設置,但無法達到斷點。
2 回答

慕桂英4014372
TA貢獻1871條經驗 獲得超13個贊
這就是我運行調試器的方式:
當出現提示時:
端口 9,000 已被占用 配置 IDE 使用其他端口?
單擊“是”(或者您可以從“工具”->“選項”打開設置:選擇“PHP”->“調試”)
將調試器端口設置為 9001。
更新 php.ini 以擁有端口 9001
[XDebug]
zend_extension="C:\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 1
xdebug.remote_enable = 1
xdebug.remote_host = "localhost"
xdebug.remote_handler = "dbgp"
xdebug.remote_mode = "req"
xdebug.remote_port = 9001
重新啟動XAMPP

滄海一幻覺
TA貢獻1824條經驗 獲得超5個贊
我多年來一直使用 Netbeans 來編寫 PHP 代碼,但 xdebug 一直是一種痛苦。我什至無法給你任何指示。
但我去年改用了 VS code,我可以誠實地說它改進了我的代碼,而且 xdebug 實際上很容易連接,而且使用起來很有趣。
我建議你嘗試一下。
- 2 回答
- 0 關注
- 132 瀏覽
添加回答
舉報
0/150
提交
取消