phpstorm + xdebug遠程調試

終於把遠程調試搞定了,這裏分享以下配置和經驗

;第一步安裝xdebug並加入一下配置
[XDebug]
zend_extension="/usr/local/php/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so"
xdebug.default_enable = On
xdebug.collect_params = On
xdebug.remote_connect_back = 1           //如果開啓此,將忽略下面的 xdebug.remote_host 的參數。 <一臺webserver有多個開發者的工作目錄的時候使用,如:p1.xx.com,p2.xx.com,p3.xx.com 。。。等。 >
xdebug.remote_host = 192.168.33.1    //注意這裏是,客戶端的ip<即IDE的機器的ip,不是你的web server>
xdebug.remote_port = 7777                       //      注意這裏是,客戶端的端口<即IDE的機器的ip,不是你的web server>
xdebug.remote_enable = On
xdebug.remote_handler = dbgp
xdebug.remote_log = "/usr/local/php/var/log/xdebug.log"
xdebug.remote_req = req
xdebug.auto_trace = Off
xdebug.remote_autostart = On
xdebug.show_exception_trace = 0
xdebug.collect_vars = On
xdebug.collect_return = On
xdebug.collect_params = On
xdebug.var_display_max_depth = 15
xdebug.show_local_vars = 1
xdebug.dump_undefined = 1
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = "/var/www/xdebug"
xdebug.idekey = phpstrom

;第二步
在文件->設置->語言與框架中  找到debug  設置端口爲7777
;第三步
在DBGp Proxy中配置你的idekey idekey就是你在配置文件中寫的那個,host是你的服務器ip,port可以自選,一般默認選80就好了
;第四步  配置server部分
自己手動添加一個,Host填服務器ip,然後port是默認80端口,如果你修改過,你可以更改成你設置的web端口,debug選xdebug
;第五步
自己手動添加一個xdebug實例,server選擇剛纔配置的server名稱

;具體圖片信息參考以下文章
http://www.cnblogs.com/dtiove/p/5644833.html
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章