新手看這一篇就夠了,包教包會。
如果你用的是wamp集成開發環境,恭喜你,你成功了一小半,如果不是,也沒關係,方法大同小異,只不過一些文件放的地方不一樣而已。
需要準備的東西:
1. xdebug.dll這個庫文件
如果你裝的是wamp環境,你自帶的就有這個文件,路徑:wamp\bin\php\php5.5.12\zend_ext
如果你不是,那麼你就乖乖的去下吧:http://xdebug.org/ 注意你的PHP版本要跟XDebug版本要對應
2.操作步驟:
1.修改你的php.ini 文件,將下面代碼替換過去就好了:
zend_extension = "E:/wamp/bin/php/php5.5.12/zend_ext/php_xdebug-2.2.5-5.5-vc11.dll"
;
[xdebug]
xdebug.remote_enable = off
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "E:/wamp/tmp"
xdebug.show_local_vars=0
xdebug.remote_enable = On
xdebug.remote_handler = dbgp
xdebug.remote_host= localhost
xdebug.remote_port = 9001
xdebug.idekey = PHPSTORM
紅字的地方是每個人的情況是不一樣的,注意你們的存放路徑。2.配置你的php
第二步:判斷xdebug是否加載,可以打印phpinfo()函數 進行查看
第三步: 配置phpstorm編輯器中相關配置
File->Settings->Languages&Frame Works->Php->Interpreter 選擇web服務器套件中php.exe的路徑
第四步:File->Settings->Languages&Frame Works->Php->Servers 配置服務器相關設置:
Name:localhost
Host:localhost
Port:80
Debugger: Xdebug
作者: ghost_0019
鏈接:http://www.imooc.com/article/14841
來源:慕課網
本文原創發佈於慕課網 ,轉載請註明出處,謝謝合作!
第二步:判斷xdebug是否加載,可以打印phpinfo()函數 進行查看
第三步: 配置phpstorm編輯器中相關配置
File->Settings->Languages&Frame Works->Php->Interpreter 選擇web服務器套件中php.exe的路徑
第四步:File->Settings->Languages&Frame Works->Php->Servers 配置服務器相關設置:
Name:localhost
Host:localhost
Port:80
Debugger: Xdebug
作者: ghost_0019
鏈接:http://www.imooc.com/article/14841
來源:慕課網
本文原創發佈於慕課網 ,轉載請註明出處,謝謝合作!
第二步:判斷xdebug是否加載,可以打印phpinfo()函數 進行查看
第三步: 配置phpstorm編輯器中相關配置
File->Settings->Languages&Frame Works->Php->Interpreter 選擇web服務器套件中php.exe的路徑
第四步:File->Settings->Languages&Frame Works->Php->Servers 配置服務器相關設置:
Name:localhost
Host:localhost
Port:80
Debugger: Xdebug
作者: ghost_0019
鏈接:http://www.imooc.com/article/14841
來源:慕課網
本文原創發佈於慕課網 ,轉載請註明出處,謝謝合作!
作者: ghost_0019
鏈接:http://www.imooc.com/article/14841
來源:慕課網
本文原創發佈於慕課網 ,轉載請註明出處,謝謝合作!
3.配置servers
4.配置debug
5.配置DBGp
6.配置run
7.配置warmp
8.最後到火狐瀏覽器中下載一個xdebug helper插件就可以啦。
9.最後一步,在項目中打好斷電,點擊phpstorm左上角的爬蟲,就能用啦,親測能用。