一、xdebug的下载和安装:
1.下载xdebug的地址,可以到官方网站http://www.xdebug.org/下载,建议下载与本机安装wamp相匹配的文件。具体下载方法如下:将phpinfo网页的源代码拷贝到http://www.xdebug.org/find-binary.php,然后按照指导安装即可。如下图所示:
2.配置xdebug,在wamp安装的目录下:wamp\wamp\bin\apache\apache2.4.23\bin\php.ini,修改最后的文件为:
[xdebug]
zend_extension = D:\wamp\wamp\bin\php\php5
.6.25\ext\php_xdebug-
2.5.4-
5.6-vc11-x86_64.dll
;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 =
"D:/wamp/wamp/tmp"
xdebug.show_local_vars=
0
xdebug.idekey=
"PHPSTORM"
xdebug.remote_handler =
"dbgp"
xdebug.remote_mode =
"req"
xdebug.remote_host=
127.0.0.1
xdebug.remote_enable=on
xdebug.remote_port =
9000
xdebug.remote_autostart = ON
重启Apache。
3.配置phpstorm:
4.在chrome浏览器添加Xdebug helper扩展程序,不会翻墙的,请查看https://laod.cn/hosts/2017-google-hosts.html
将phpstorm加入
二、wamp下添加vhost虚拟主机
<VirtualHost *:
80>
DocumentRoot
"D:/wamp/wamp/www/hk/backend/web"
ServerName admin.hk.cn
</VirtualHost>
2.在C:\Windows\System32\drivers\etc修改host文件,添加虚拟主机的名称:
127.0.0.1 admin.hk.cn
重启apache。