windows 安装xdebug https://www.jetbrains.com/help/phpstorm/configuring-xdebug.html

一.下载

下载与PHP版兼容的Xdebug扩展,并将其保存在php /文件夹中。

php /文件夹 的位置是在PHP引擎安装期间定义的。

如果您使用的是AMP软件包,则可能已安装Xdebug扩展。按照xdebug.txt中的说明进行操作

二. 将Xdebug与PHP解释器集成 在php.in加入

[XDebug]
zend_extension="php_xdebug.dll"
xdebug.idekey = PHPSTORM
xdebug.show_error_trace = 1
;指定Xdebug扩展文件的绝对路径
;启用性能检测分析
xdebug.profiler_enable=On
;启用代码自动跟踪
xdebug.auto_trace=on
;允许收集传递给函数的参数变量
xdebug.collect_params=On
;允许收集函数调用的返回值
xdebug.collect_return=On
;指定堆栈跟踪文件的存放目录
xdebug.trace_output_dir="C:\phpStudy\PHPTutorial\tmp\xdebug"
xdebug.profiler_output_dir="C:\phpStudy\PHPTutorial\tmp\xdebug"
xdebug.remote_enable = On
xdebug.remote_port=9000
xdebug.remote_handler = dbgp
xdebug.remote_host = localhost
xdebug.var_display_max_depth = 10

liunux安装php xdebug

http://xdebug.org/install.php#configure-php
A list of all settings: http://xdebug.org/docs-settings.php
A list of all functions: http://xdebug.org/docs-functions.php
Profiling instructions: http://xdebug.org/docs-profiling2.php
Remote debugging: http://xdebug.org/docs-debugger.php

一、下载并编译 xdebug

下载 xdebug 最新的源码包

wget https://xdebug.org/files/xdebug-2.6.0.tgz

解压缩

tar -zxvf xdebug-2.6..tgz

编译安装

cd xdebug-2.6.
phpize
./configure --enable-xdebug
make
make install

三、配置

  • /etc/php/7.2/mods-available/xdebug.ini加入

  • zend_extension=xdebug.so
    extension=xdebug.so
    xdebug.remote_enable =
    xdebug.remote_port =
    xdebug.idekey = PHPSTORM
    xdebug.show_error_trace =
    xdebug.remote_autostart =
    xdebug.file_link_format = phpstorm://open?%f:%l
  • 在php.ini中增加xdebug配置 xdebug.so路径 在安装完xdebug时控制台会有提示

zend_extension="php_xdebug.dll"
xdebug.idekey = PHPSTORM


xdebug.remote_enable = On
xdebug.remote_port=9000
xdebug.remote_handler = dbgp
xdebug.remote_host = localhost
xdebug.var_display_max_depth = 10

 
  • 增加软连接  //一下配置我并没有使用
cd /etc/php/7.2/fpm/conf.d/
sudo ln -s /etc/php/7.2/mods-available/xdebug.ini -xdebug.ini
cd /etc/php/7.2/cli/conf.d/
sudo ln -s /etc/php/7.2/mods-available/xdebug.ini -xdebug.ini

重启apache,检测是否安装成功:

$ sudo apachectl restart
$ php -m | grep xdebug

四、测试

  1. cli 环境下,查看 php -m
  2. 测试 phpinfo,查看 xdebug 的信息 (略)
  3. phpstorm 测试 xdebug

ubuntu 安装php xdebug的更多相关文章

  1. Mac OS、Ubuntu 安装及使用 Consul

    Consul 概念(摘录): Consul 是 HashiCorp 公司推出的开源工具,用于实现分布式系统的服务发现与配置.与其他分布式服务注册与发现的方案,比如 Airbnb 的 SmartStac ...

  2. ubuntu安装mysql

    好记性不如烂笔头,记录一下,ubuntu安装mysql的指令. 安装MySQL: sudo apt-get install mysql-server sudo apt-get install mysq ...

  3. ubuntu安装vim时提示 没有可用的软件包 vim,但是它被其它的软件包引用了 解决办法

    ubuntu安装vim时提示 没有可用的软件包 vim-gtk3,但是它被其它的软件包引用了 解决办法 本人在ubuntu系统安装vim  输入 sudo apt-get install vim 提示 ...

  4. docker 1.8+之后ubuntu安装指定版本docker-engine

    这边记录ubuntu安装过程,首先是官网文档 If you haven’t already done so, log into your Ubuntu instance. Open a termina ...

  5. debian/ubuntu安装桌面环境

    apt-get install xorg apt-get install gnome 然后startx ubuntu 安装Gnome桌面 1.安装全部桌面环境,其实Ubuntu系列桌面实际上有几种桌面 ...

  6. 一个ubuntu phper的自我修养(ubuntu安装)

    ubuntu安装篇 一.ubuntu下载 到ubuntu官网下载适合自己电脑配置的系统版本,此处不做展开. 二.制作USB启动盘 在windows下制作USB启动盘,工具是universal usb ...

  7. ubuntu 安装JAVA jdk的两种方法:

    ubuntu 安装jdk 的两种方式: 1:通过ppa(源) 方式安装. 2:通过官网下载安装包安装. 这里推荐第1种,因为可以通过 apt-get upgrade 方式方便获得jdk的升级 使用pp ...

  8. [其他]Ubuntu安装genymotion后unable to load VirtualBox engine

    问题: Ubuntu安装genymotion后unable to load VirtualBox engine 解决办法: 如果没有安装VirtualBox,要先安装VirtualBox. 安装Vir ...

  9. Ubuntu安装出现左上角光标一直闪解决方式

    Ubuntu安装出现左上角光标一直闪解决方式: 01下载ubunu http://cn.ubuntu.com/download/ 02.软碟通 http://pan.baidu.com/s/1qY8O ...

随机推荐

  1. Python3解leetcode Min Cost Climbing Stairs

    问题描述: On a staircase, the i-th step has some non-negative cost cost[i]assigned (0 indexed). Once you ...

  2. C# 获取路径中,文件名、目录、扩展名等

    string path = "C:\\dir1\\dir2\\foo.txt"; string str = "GetFullPath:" + Path.GetF ...

  3. Incorporating ASP.NET MVC and SQL Server Reporting Services, Part 2

    In the last issue, I introduced you to the basics of incorporating SQL Server Reporting Services int ...

  4. UX168办公本地环境维护记录

    上班到公司 1.打考勤靠.或处理考勤异常 2.钉钉 3.邮件. 4.禅道系统 5.开启nginx.node.monogo服务 5.1.开启nginx服务 /etc/init.d/apache2 sto ...

  5. Log4d:Error:Could not instantiate class[com.mapgis.util.tools.JDBCExtAppender]

    https://blog.csdn.net/gikieng/article/details/47150567  https://blog.alswl.com/2018/03/sql-server-mi ...

  6. vue组件传值之父传子

    1.父组件给子组件传值  home父组件  header子组件  关键字props home代码 <template> <div> <v-header :title=&q ...

  7. sqlalchemy.orm.exc.DetachedInstanceError: 错误解决

    使用sqlchemy查询出一个集合的时候第一个对象可以使用,后面的就报如下错误. sqlalchemy.orm.exc.DetachedInstanceError: Instance <Logi ...

  8. EXE的32位或64位判断

    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC> dumpbin /headers "Program.exe" ...

  9. 【转】时间序列分析——基于R,王燕

    <时间序列分析——基于R>王燕,读书笔记 笔记: 一.检验: 1.平稳性检验: 图检验方法:     时序图检验:该序列有明显的趋势性或周期性,则不是平稳序列     自相关图检验:(ac ...

  10. SqlServer 索引和视图

    Ø 索引 1. 什么是索引 索引就是数据表中数据和相应的存储位置的列表,利用索引可以提高在表或视图中的查找数据的速度. 2. 索引分类 数据库中索引主要分为两类:聚集索引和非聚集索引.SQL Serv ...