开发环境:
Wamp+PhpStorm+Chrome
环境配置:
- PHP安装xdebug扩展,修改Wamp的php.ini文件,php.ini可以在wamp安装目录下\bin\apache\apache2.4.9\bin中找到。也可以通过wamp管理面板打开该文件
修改xdebug参数为下面参数,增加xdebug.remote_port=9000,如果本机9000端口已被占用,请修改为其他未占用端口
[xdebug]
xdebug.remote_enable = on
xdebug.remote_port=9000
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
2.PHPStorm参数配置
打开参数设置面板file->settings 修改php->servers参数。name可以自己定义,host为localhost,port为80,debugger为xdebug
修改DBGp Proxy 参数IDE key:phpStorm, host:localhost, port:80
修改php->debug,xdebug->debug port 修改为9000
3.chrom中安装Chrome浏览器扩展插件 Xdebug helper,因为google被屏,国内访问不到google插件商城。本站提供了国内下载地址http://ziyuan.rocmy.com/thread-1048-1-1.html,直接拖到扩展程序中启用
4.修改xdebug helper的IDE key 为PhpStorm
5.PhpStorm中开启监听
- 本文固定链接: http://www.mayanpeng.cn/?p=1020
- 转载请注明: M.Poison 于 马艳鹏个人主页 发表