phpstorm 使用xdebug斷點

一、下載對應版本 xdebug

下載地址:https://download.csdn.net/download/q2104574/11185239php

好比你用的php7.0.12以上的版本,xdebug擴展程序也要對應是7.0的版本,大版本號一致便可,php_xdebug-2.7.0alpha1-7.0-vc14-nts.dll    ,我這邊是用32位的,64位不行。chrome

 

二、把文件丟到php版本下的文件夾

 C:\phpStudy\PHPTutorial\php\php-7.0.12-nts\ext   數組

三、配置php.ini

C:\phpStudy\PHPTutorial\php\php-7.0.12-nts\php.ini瀏覽器

拉到最下面,找到xdebug的配置節點,填入一下信息,重啓phpstudyphp7

[XDebug]
;; Only Zend OR (!) XDebug
zend_extension = C:\phpStudy\PHPTutorial\php\php-7.0.12-nts\ext\php_xdebug-2.7.0alpha1-7.0-vc14-nts.dll
xdebug.remote_enable =1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_mode = "req"
xdebug.remote_port = 9000
xdebug.idekey = PHPSTORM

 

重啓phpstudy,打開phpinfo頁面,搜索xdebug 找的到就算安裝成功,找不到的話請安裝64位版本,或者php版本跟xdebug不對phpstorm

 

 

四、下載瀏覽器插件xdebug而且安裝開啓

(我這邊是chrome),每一個瀏覽器都有 ,如谷歌就搜索  chrome xdebug   、360xdebug。。。。ide

下載地址:https://download.csdn.net/download/q2104574/11185215spa

裝完插件後,點擊插件,點擊Debug,即開啓.net

 

 

 五、在phpstorm,點擊進行斷點,記住一點是要本頁面的後臺

六、phpstorm 開啓調試(變綠色即開啓)

 

 七、運行頁面,進到斷點接口對應的觸發頁面,會自動進入斷點

 鼠標移上去變量,會出現值,下面的對話框也能夠查看值,數組什麼的點加號能夠點開。插件

 

相關文章
相關標籤/搜索