xdebug官方提供了一個很是友好的安裝指導:php
https://xdebug.org/wizard.phpide
打開上面的網站,將你的phpinfo
頁面輸出的內容複製到表單中,而後點擊網站
Analyse my phpinfo() output
按鈕提交,隨後會生成一個爲你的php環境定製化spa
的xdebug安裝說明,按照步驟完成安裝。debug
[Xdebug] xdebug.remote_autostart=1 xdebug.default_enable=1 xdebug.remote_port=9000 xdebug.remote_host=127.0.0.1 xdebug.remote_connect_back=1 xdebug.remote_enable=1 xdebug.idekey=PHPSTORM
一、打開設置窗口,選擇菜單 Languages & Frameworks > PHP > Debug,確保Debug端口和php.ini中配置的一致。通常默認爲9000且無需改動。調試
二、設置 DBGp Proxy
,IDE key與php.ini配置的一致code
三、設置 server,Name和Host填寫你須要斷點調試的域名server
四、配置斷點調試站點:blog
使用Comand + Shift + A
快捷鍵搜索`Edit Configurations
,進入配置站點界面rem