環境: php
一、php5.6.1 windows
二、phpstorm 9.0.2 服務器
三、windows10 phpstorm
首先去官網下載安裝與本機php版本相對應的xdebug擴展 spa
http://xdebug.org/download.php debug
將解壓後的dll文件放入php的擴展目錄ext下 調試
而後打開php.ini文件,在文件的最後加上如下內容 orm
[Xdebug] rem
zend_extension="H:\phpStudy\php56n\ext\php_xdebug.dll" get
xdebug.remote_enable=1
xdebug.remote_port="9000"
xdebug.profiler_enable=1
xdebug.profiler_output_dir="H:\phpStudy\tmp\xdebug"
xdebug.profiler_output_name="callgrind.out.%p"
xdebug.collect_params = 3
保存後重啓服務器
訪問你的phpinfo文件,若是看到以下內容,就說明已經安裝成功了
第二部分是經過設置phpstorm的xdebug功能實現對php代碼的調式
點擊file->settings
而後保存 關閉settings窗口
打開
選擇第一個,後邊兩個是我已經配置好的項目
Server部分
如今就能夠在你的項目文件中設置斷點,進行調試了