第一步
phpStorm -> Settings -> php -> Debug设置xdebug 为9000,具体如下:
![](http://dl.iteye.com/upload/attachment/0077/3319/4df14e1f-3369-3207-b552-8a66f87d41b3.jpg)
接着
打开你所配置的php目录下的php.ini,指定php_xdebug.dll位置,并开启xdebug,具体如下:
注意这里的9000与上面的9000是一一对应的,如果上方为9001,这里就为9001
[zend]
zend_extension="E:/work/PHP/ext/php_xdebug.dll"
xdebug.remote_enable = On
xdebug.remote_host = "localhost"
xdebug.remote_port = 9000
xdebug.remote_handler = "dbgp"
xdebug.auto_trace = 1
xdebug.collect_includes = 1
xdebug.collect_params = 1
xdebug.collect_return = 1
xdebug.default_enable = 1
xdebug.collect_assignments = 1
xdebug.collect_vars = 1
xdebug.remote_autostart = 1
xdebug.remote_connect_back = 1
xdebug.show_local_vars = 1
xdebug.show_exception_trace = 0
第二步
phpStorm -> Settings -> php -> Servers新建一个Server,并指定你的服务器地址,具体如下:
这里的port根据自己的设置而填写相应的
第三步
start listen php debug connection,具体如下:
点击下面的“红色电话”按钮让其变绿即可
![](http://dl.iteye.com/upload/attachment/0077/3327/3c83d0ba-eee4-3dcb-ba6b-4e4fb628f2b5.jpg)
-------》
![](http://dl.iteye.com/upload/attachment/0077/3329/327a12ea-193b-3a48-8c11-7699dec72fd2.jpg)
第四步
设置断点
![](http://dl.iteye.com/upload/attachment/0077/3333/64f7d9f5-36d3-31da-987a-fd746bf2c0f1.jpg)
第五步
用浏览器打开即可断点
用浏览器打开即可断点