在網上找了很多netbeans下通過xdebug調試php程序的教程,都不成功。
可能是最近軟件有更新吧。經過幾天摸索,終於成功了。
步驟如下
1.下載xampp,編輯php.ini,打開xdebug
[XDebug]
zend_extension = "D:\xampp\php\ext\php_xdebug.dll"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_mode = "req"
xdebug.remote_port = 9000
xdebug.idekey = "netbeans-xdebug"
關閉緩衝區(特別重要,其它教程都沒說)
output_buffering = Off
implicit_flush=On
2.安裝瀏覽器xdebug插件
firefox下試了很多,感覺這個好用