Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

How to Install PHP Xdebug on Ubuntu?

  • Last Updated : 06 Jan, 2022

Xdebug is a debugging and profiling tool for use on development servers. Xdebug allows fatal errors to be debugged with the same clarity available during normal program execution without the limitation of the shutdown processes.

Xdebug’s Profiler is a powerful tool that gives you the ability to analyze your PHP code and determine which parts of your code are slow and could use a speed boost. The profiler also collects information about how much memory is being used, and which functions and methods increase memory usage.

PHP needs to be installed on your system to successfully install PHP-Xdebug.

Verify PHP Xdebug installation on Ubuntu

Open terminal on your Ubuntu system and type the following command:

dpkg –list | grep php-xdebug

dpkg in the command above stands for Debian package. Hence, dpkg –list will display all the packages installed with dpkg, and grep php-xedebug will filter out any installation for Xdebug.

If there is no result like shown in the above image, then follow the steps below to install php-Xdebug.

Installation of php-Xdebug

Step 1: Update your system packages.

sudo apt-get update -y

This command is used to update your system repositories using the apt update package manager. And “-y” gives yes for any asked permission beforehand.

Step 2: Run the command for installing php-Xdebug

sudo apt-get install -y php-xdebug

Again verify the installation

dpkg –list | grep php-xdebug

Here, it can be seen that php-Xdebug is properly installed.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!