phpstorm8 + wamp2.5 調試項目 (xdebug)

一,配置wamp安裝目錄下的 \bin\apache\apache2.4.9\bin 目錄下的php.ini文件,下拉到最下面,配置[xdebug]:php

[xdebug]
xdebug.remote_enable = on
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "D:/Software/wamp/tmp" (這一行改爲本身的目錄)
xdebug.show_local_vars=0
xdebug.remote_handler=dbgp
;設置xdebug的端口爲9001
xdebug.remote_port = 9001
;設置idekey
xdebug.idekey="PHPSTORM"web

Image 013

 

二,在配置具體的項目以前,咱們先配置好默認設置(default setting),避免每次創建項目都要進行的重複操做apache

1.點擊File → Default Setting → Languages & Frameworks → PHP  如圖:app

Image 002

2.彈出interpreters窗口ide

Image 003

3.debug

Image 004

4.正常狀況下,配置好以後會顯示xdebug版本3d

Image 005

5.設置xdebug端口號調試

Image 006

6.設置 DBGp Proxyblog

Image 007

三,默認設置已經設置好,接下來導入或者打開一個工程,開始設置(File → Setting)rem

1.設置Servers,點擊綠色的「+」配置一個新的Server

Image 008

2.接下來設置運行配置(Run → Edit Configuration),設置默認的PHP web application配置

Image 009

3.新建一個php web application

Image 010

4.設置好斷點並開始調試

Image 012

5.調試成功,如圖:

Image 011

相關文章
相關標籤/搜索