netbeans phpstorm 通過 xampp xdebug 開啓單步調試

在網上找了很多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下試了很多,感覺這個好用

easy Xdebug (with moveable icon)0.7.0

這個也行,但是有點小bug

The easiest Xdebug

看插件手冊http://manual.pohape.ru/xdebug/

3.設置netbeans
選項---》php---》調試---》
調試器端口 9000
會話id netbeans-xdebug(要和瀏覽器中的Value of the debug cookie一致,和php.ini中的key要一致)






發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章