由于wamp本身已经下载了xdebug,只要配置开启就好了。php
1. 配置php.ini(有就打开注释,没有就加上)chrome
XDEBUG Extension
[xdebug]
zend_extension ="D:/wamp64/bin/php/php5.6.25/zend_ext/php_xdebug-2.4.1-5.6-vc11-x86_64.dll"
xdebug.remote_enable = 1
;远程主机
xdebug.remote_host = localhost
;主机端口
xdebug.remote_port = 9001
;开启自动开始调试
xdebug.remote_autostart=on
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir ="D:/wamp64/tmp"
xdebug.show_local_vars=0
xdebug.idekey = PHPSTORM ;必须和PHPSTORM里配置的同样浏览器
2.配置PHPSTORMide
3.下载Web debug插件,这里都是chrome的(任选一个):spa
1. xdebug_helper.crx 连接:http://pan.baidu.com/s/1gftMZKZ 密码:whhm插件
2. JetBrains IDE Support Chrome_2_0_7_.crx 连接:http://pan.baidu.com/s/1sk8L0Ix 密码:3nuodebug
4. 选择要调试的页面,编辑当前配置调试
1) PHPStorm内部调试,不使用浏览器orm
小电话左上角能够点成红色,也能够点成绿色。blog
点击 Edit Configurations,选择 PHP Script
增长断点,点击小绿虫,选择单步运行,就能够进行愉快地调试了~~
2) 浏览器配合调试
小电话必须点成绿色
同上,只是第二步选择 PHP Web Application,添加断点以后运行小绿虫,刷新浏览器便可。