phpstorm設定斷點除錯
環境是:wamp
PHP Version: 5.5.12
網上的教程很多,我自己按照教程操作,實現了斷點除錯,下面是我設定斷點除錯的步驟
1.修改配置檔案php.ini,按下面修改(位置在最後)
; XDEBUG Extension
zend_extension = "D:/wamp/bin/php/php5.5.12/zend_ext/php_xdebug-2.2.5-5.5-vc11.dll"
;
[xdebug]
xdebug.remote_enable = on
xdebug.remote_host="127.0.0.1"
xdebug.port=9000
xdebug.profiler_enable = on
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.remote_autostart=on
xdebug.profiler_output_dir = "D:/wamp/tmp"
xdebug.show_local_vars=0
xdebug.idekey = PHPSTORM
修改完後重啟服務
用phpinfo檢視,出現如下配置,則代表修改成功
2.phpstorm設定
File->Settings->
PHP->Server 新建一個 name為localhost Host為localhost Port:80,Debugger:Xdebug
PHP->Debug頁面 Debug Port設定為9000
PHP標籤下Debug->DBGp Proxy 配置如下
配置PHP Web Application
4.在chome上安裝擴充套件,下載JetBrains IDE Support擴充套件,安裝
5.可以進行斷點除錯了
設定斷點
設定好斷點後點擊右上角綠色的小蟲子按鈕,phpstorm中會出現
如果沒有出現斷點除錯資訊,看是否打開了監聽選項
接下來可以進行斷點除錯了