系統: windows10php
WampServer: wampserver2.2e-php5.3.13-httpd2.2.22-mysql5.5.24-32b.exehtml
IDE: IntelliJ IDEA 2017.3.2mysql
Intellij IDEA 如何支持php請參考,IntellIJ IDEA 配置 Vue 支持。web
1.配置 wamp 安裝目錄下的php.ini文件,D:\wamp\bin\apache\apache2.2.22\bin\php.ini ,編輯內容以下:sql
;開啓遠程調試 xdebug.remote_enable = on xdebug.profiler_enable = on xdebug.profiler_enable_trigger = on xdebug.profiler_output_name = cachegrind.out.%t.%p xdebug.profiler_output_dir = "D:/wamp/tmp" xdebug.show_local_vars=0 ;遠程處理協議 xdebug.remote_handel=dbgp ;端口號 xdebug.remote_port=9001 ;IDE KEY xdebug.idekey="phpxdebug"
1.打開須要debug的項目,選擇 File -》 Settings :apache
2.配置php的執行文件路徑、和當前版本:windows
3.添加本地php可執行路徑網絡
點擊應用後,選擇剛纔配置好的php路徑配置:app
4.配置xdebug,填寫上文在php.ini中設置好的端口號:ide
5.配置DBGp Proxy參數:
6.配置你須要調試的web應用地址:
7.設置當前web application的 Run/Debug Configurations, 點擊IDE的右上角,點擊編輯配置信息:
8.添加一個PHP Web Application:
9.打開xdebug 監聽開關,在須要調試的地方設置斷點:
到這一步已經大功告成了,點擊右上角的 debug 按鈕開始調試!
注意:
IDE開啓了xdebug監聽的話,訪問該web應用,會自動激發debug動做。無需手動點擊IDE的debug按鈕。
記得請一真打開 xdebug 監聽,不然在非調試狀況下訪問web應用會很慢。
多是xdebug會向外廣播調試數據,沒有接收者響應的話,會輪詢各個網絡吧,因此致使響應慢,這純屬我的猜想。
PS: