Apache Xdebug



Documentation - all settings. This section describes all available configuration settings available in Xdebug. Unless specifically mentioneds, each setting can be set in php.ini, files like 90-xdebug.ini, but also in Apache's.htaccess and PHP-FPM's.user.ini files. A select set of settings can be set through an XDEBUGCONFIG environment variable. In this situation, the xdebug. About Apache Friends. Apache Friends is a non-profit project to promote the Apache web server and is home to the XAMPP project. XAMPP is an easy to install Apache.

Apache Xdebug
Free collection of beautiful vector icons for your web pages.

Introduction

Apache Debug

Xdebug is a powerfull tool for debugging PHP. It can display formated errors and embed the usefull var_dump function.This page explains how to install and configure Xdebug.

The following has been tested on a Cloud9 server with the following versions:

  • Linux 4.9.120-c9 (How to check my Linux version?)
  • Ubuntu 14.04.5 LTS Trusty (How to check my Linux version?)
  • PHP 7.2.9 (How to check my PHP version?)
Apache Xdebug

Check you configuration

Sometime, Xdebug is not configure, and the var_dump function is not displayed properly.Create a PHP file on your server with the following content:

Check if the display is formated. On the following illustration, var_dumpis not displayed properly:

Check if the Xdebug module is installed. The following command displays the listof PHP modules instaled:

Xdebug apache timeout

If Xdebug is already installed (Xdebug is in the list of instaled module), skip the next step.

Install Xdebug

Install the following package:

Restart Apache2 manualy or with the following command:

Xdebug Apache Phpstorm

Configure Xdebug

Check if var_dump is now formated properly. If not, add or update the html_errorsparameter in your php.ini file:

Apache Xdebug Enable

Display should now be formated:

Optional configuration

Apache XdebugDebug

Apache Debug Level

I also strongly recommand to set the following parameters only on your local environment in your php.ini. Thiswill display PHP errors and warning in the page:

See also

Last update : 01/07/2021

Apache Xdebug Docker

'>