Vagrant+PHPStorm實(shí)現(xiàn)XDebug斷點(diǎn)調(diào)試

下面由phpstorm教程欄目給大家介紹vagrant+phpstorm+google+xdebug斷點(diǎn)調(diào)試 ,希望對(duì)需要的朋友有所幫助!

1.登陸vagrant修改xdebug.ini配置

A.  登陸vagrant:vagrant ssh  B.  修改配置:sudo vim /etc/php/7.0/fpm/conf.d/20-xdebug.ini       配置內(nèi)容:      zend_extension=xdebug.so      xdebug.remote_enable = 1      xdebug.remote_connect_back = 1      xdebug.remote_port = 9001      xdebug.max_nesting_level = 512      xdebug.remote_host="192.168.10.10"      xdebug.idekey = "PHPSTORM"      xdebug.default_enable = 1      xdebug.remote_enable = 1      xdebug.remote_autostart = 1      xdebug.remote_handler="dbgp"    C.重啟php: sudo service php7.0-fpm restart

2.在PHPStorm->Preferences->Languages & Frameworks->PHP中箭頭指向配置
Vagrant+PHPStorm實(shí)現(xiàn)XDebug斷點(diǎn)調(diào)試

選擇+,選擇from vagrant
Vagrant+PHPStorm實(shí)現(xiàn)XDebug斷點(diǎn)調(diào)試

配置如下:

立即學(xué)習(xí)PHP免費(fèi)學(xué)習(xí)筆記(深入)”;

Vagrant+PHPStorm實(shí)現(xiàn)XDebug斷點(diǎn)調(diào)試

在PHP->Debug->DBGp Proxy設(shè)置如下

Vagrant+PHPStorm實(shí)現(xiàn)XDebug斷點(diǎn)調(diào)試

在PHP->Debug設(shè)置端口

Vagrant+PHPStorm實(shí)現(xiàn)XDebug斷點(diǎn)調(diào)試

在PHP->Servers中設(shè)置映射路徑

Vagrant+PHPStorm實(shí)現(xiàn)XDebug斷點(diǎn)調(diào)試

3.在google中下載Xdebug helper,并配置

Vagrant+PHPStorm實(shí)現(xiàn)XDebug斷點(diǎn)調(diào)試

備注:如果不能斷點(diǎn)代表Xdebug和php版本不對(duì)應(yīng),可以將其他php版本的20-xdebug.ini都設(shè)置

? 版權(quán)聲明
THE END
喜歡就支持一下吧
點(diǎn)贊5 分享