分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 软件开发

phpstrom 配置xdebug在vagrant上调试

发布时间:2023-09-06 01:14责任编辑:赖小花关键词:配置debug

参数

1 linux system : centos6.52 3 vagrant: ?2.0.04 5 PHP: 5.6.46 7 phpstrom:2017.2

步骤1:

安装xdebug扩展(已安装可跳过步骤1),首先去 xdebug官方下载扩展包

https://xdebug.org/download.php

wget下载得到tgz压缩包,tar解压

进入解压完目录执行phpinze(确保php扩展已经安装,未安装自行安装),目录会生成configure目录

执行./configure --with-php-config=/usr/local/php/bin/php-config(这个php-config路径不一定相同,自行确定),完毕后执行make,完毕后执行make install,没有报错情况下扩展正常生成

进入php.ini文件添加‘zend_extension=xdebug.so‘,开启  xdebug.remote_enable = 1 xdebug.auto_trace = 1 xdebug.collect_return = 1 xdebug.profiler_enable = 1 xdebug.remote_port = 9002相关配置节保存退出

重启php-fpm服务器,查看Phpinfo信息可见xdebug信息

步骤2:

配置phpstrom中vagrant

打开seting-》PHP

打开-》CLI Interpreter

点击左边的+添加一个配置项

保存更改,如果php strom连接不上vagrant,新建一个deployment,参考SO:https://stackoverflow.com/questions/36328731/phpstorm-can%C2%B4t-connect-to-vagrant-to-add-a-remote-php-interpreter-private-key-n 中useful答案

返回CLI interpreters选择deployment  configuration 选择刚才新建的deployment,设置general中php executable为vagrant中的Php bin执行路径

phpstrom 配置xdebug在vagrant上调试

原文地址:http://www.cnblogs.com/gy1010/p/7611738.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved