Make xDebug Work

Open-source is great for us if not considering same great amount of headaches trying to keep those libraries we’re using consistent. xDebug is one of those great headaches we can imagine.

To configure it correctly in Centos operating systems follow three steps below to get yourself on the landing zone to further configuration activities:

  1. Ensure the REMI repository on your system is up to date
  2. Install a correct version of xDebug to match with the PHP engine on your system.
  3. Use IP address if your system is set in a static IP address

Sounds pretty much promisable so far, isn’t it?

Click here for details from the steps above.

But more important: Don’t forget to have your firewall port open for xDebug, and it usually uses the port 9003, or 9000, and then if you have SELinux enabled, set it in a mode of permissive instead of enforcing. Also, allow httpd to make outwards connections.

The firewall port and the SELinux settings are two TOP Most causes of the headache !

Configure SELinux and run command below to avoid the most headaches:

From /etc/selinux/config, change SELINUX=enforcing to SELINUX=permissive.

From the command line, run:

setsebool -P httpd_can_network_connect on

Let’s keep moving on…

Ensure REMI repository up to date

Run it a command line to find out which php.ini that should be used to configure xDebug:

php --ini

my signature
August 2, 2021