How to compile and install xdebug in Ubuntu environment

How to compile and install xdebug in Ubuntu environment

This article describes how to compile and install xdebug in Ubuntu environment. Share with you for your reference, the details are as follows:

We have previously introduced how to compile and install PHP and Nginx in Ubuntu. Here we will explain how to compile and install xdebug from source code.

Download and unzip xdebug

xdebug download address: https://xdebug.org/download.php

I downloaded 2.3.3. Actually, I don’t know the difference between these versions, so I just downloaded one at random.

cd /usr/local/src
wget https://xdebug.org/files/xdebug-2.3.3.tgz
tar -zxvf xdebug-2.3.3.tgz

Compile and install xdebug

PHP is installed in the /opt/php path

cd /usr/local/src/xdebug-2.3.3
/opt/php/bin/phpize
./configure --prefix=/opt/xdebug --with-php-config=/opt/php/bin/php-config
make && make install

After successful installation, the following information will be displayed:

Installing shared extensions:
/opt/php/lib/php/extensions/no-debug-non-zts-20131226/

Configure php.ini

We add the xdebug extension at the end of php.ini:

zend_extension=/opt/php/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so

Restart nginx to take effect.

If you can't find php.ini, you can use /opt/php/bin/php -i |grep php.ini to find the path information of php.ini. If there is no php.ini file in the corresponding path, you can cpoy a php.ini-development or php.ini-production from the unzipped php source code.

I hope this article will help you configure your Ubuntu environment.

You may also be interested in:
  • Building a PHP development environment under Ubuntu (nginx+(cgi)php5fpm+memcached+xdebug)
  • Detailed installation and configuration of Xdebug, a PHP code debugging tool in Windows and Linux
  • CentOS installation PHP5.5+Redis+XDebug+Nginx+MySQL full record
  • Detailed installation and use of php Xdebug
  • Detailed explanation of PHP plug-in installation and Xdebug configuration in Eclipse
  • Installation and use of php Xdebug debugging extension.
  • How to install the debugging tool Xdebug extension in PHP 7
  • Detailed steps for installing xdebug in PHP/installing pear in PHP/phpunit (picture)
  • Install PHP Xdebug on Mac

<<:  MySQL 8.0.12 Simple Installation Tutorial

>>:  Vue.js cloud storage realizes image upload function

Recommend

How to install docker using YUM

As shown in the following figure: If the version ...

Definition and usage of MySQL cursor

Creating a Cursor First, create a data table in M...

Docker-compose creates a bridge, adds a subnet, and deletes a network card

1. Create a docker network card [root@i ~]# brctl...

How to use Docker container to access host network

Recently, a system was deployed, using nginx as a...

Detailed explanation of type protection in TypeScript

Table of contents Overview Type Assertions in syn...

Vue implements three-dimensional column chart based on echarts

The three-dimensional column chart consists of th...

Realize map aggregation and scattering effects based on vue+openlayer

Table of contents Preface: Result: 1. Polymerizat...

How to install nginx under Linux

Nginx is developed in C language and is recommend...

Detailed explanation of the basic implementation principle of MySQL DISTINCT

Preface DISTINCT is actually very similar to the ...

How to solve jQuery conflict problem

In front-end development, $ is a function in jQue...

Summary of several principles that should be followed in HTML page output

1. DOCTYPE is indispensable. The browser determin...