1.Vagrant (LInux)環境下 Xdebug 配置 :
- zend_extension=xdebug.so
- xdebug.remote_enable = 1
- xdebug.remote_connect_back = 1
- xdebug.remote_port = 9100
- xdebug.idekey = "PHPSTORM"
- xdebug.remote_autostart = 1
- xdebug.remote_handler="dbgp"
- xdebug.remote_mode="req"
2.PHPtorm 配置:
設置好端口,和Xdebug 設置的一樣:
設置好 目錄映射,這很關鍵
配置完成,測試debug
RUN->Start Listening for PHP debug connections->打斷點->debug
瀏覽器訪問網站, PHPstorm 那邊訪問搞定!!
以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持我們。
原文鏈接:https://segmentfault.com/a/1190000021274131