您的位置:首页 > 编程语言 > PHP开发

phpstorm + xdebug远程调试

2017-08-24 00:38 519 查看
终于把远程调试搞定了,这里分享以下配置和经验

;第一步安装xdebug并加入一下配置
[XDebug]
zend_extension="/usr/local/php/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so"
xdebug.default_enable = On
xdebug.collect_params = On
xdebug.remote_connect_back = 1           //如果开启此,将忽略下面的 xdebug.remote_host 的参数。 <一台webserver有多个开发者的工作目录的时候使用,如:p1.xx.com,p2.xx.com,p3.xx.com 。。。等。 >
xdebug.remote_host = 192.168.33.1    //注意这里是,客户端的ip<即IDE的机器的ip,不是你的web server>
xdebug.remote_port = 7777                       //      注意这里是,客户端的端口<即IDE的机器的ip,不是你的web server>
xdebug.remote_enable = On
xdebug.remote_handler = dbgp
xdebug.remote_log = "/usr/local/php/var/log/xdebug.log"
xdebug.remote_req = req
xdebug.auto_trace = Off
xdebug.remote_autostart = On
xdebug.show_exception_trace = 0
xdebug.collect_vars = On
xdebug.collect_return = On
xdebug.collect_params = On
xdebug.var_display_max_depth = 15
xdebug.show_local_vars = 1
xdebug.dump_undefined = 1
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = "/var/www/xdebug"
xdebug.idekey = phpstrom

;第二步
在文件->设置->语言与框架中  找到debug  设置端口为7777
;第三步
在DBGp Proxy中配置你的idekey idekey就是你在配置文件中写的那个,host是你的服务器ip,port可以自选,一般默认选80就好了
;第四步  配置server部分
自己手动添加一个,Host填服务器ip,然后port是默认80端口,如果你修改过,你可以更改成你设置的web端口,debug选xdebug
;第五步
自己手动添加一个xdebug实例,server选择刚才配置的server名称

;具体图片信息参考以下文章 http://www.cnblogs.com/dtiove/p/5644833.html[/code] 
                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: