1

So I just updated my PHP on Plesk from 7.4 to 8.1 and I cannot get Xdebug to Step Debug. At a loss as what I'm missing. I attached image of Xdebug settings from phpinfo. Of course 7.4 works fine but is old.

My PHP.ini is modified like so:

[XDebug]
xdebug.mode=debug
xdebug.client_host = 127.0.0.1
xdebug.client_port = 9003
xdebug.start_with_request=yes
xdebug.log="/var/log/nginx/xdebug.log"
xdebug.idekey = PHPSTORM
xdebug.discover_client_host=false

Screenshot of Xdebug section of phpinfo():
enter image description here

IMSoP
  • 89,526
  • 13
  • 117
  • 169
user1110938
  • 153
  • 4
  • 11

2 Answers2

1

You need to add the following content in the php.ini (/etc/php/8.1/fpm/php.ini) configuration file, before checking the presence of the appropriate folders:

[xdebug]

zend_extension=/usr/lib/php/20210902/xdebug.so
xdebug.mode=debug,develop
xdebug.client_host=127.0.0.1
xdebug.client_port="9003"

After that, you need to configure the new interpreter for version 8.1 in the development environment.

You may also need to install the xdebug module if you haven't installed it before.

Changes can also be made to the file: /etc/php/8.1/mods-available/xdebug.ini

That's probably even better.

sudo mcedit /etc/php/8.1/mods-available/xdebug.ini
kossup
  • 11
  • 3
0

Okay, figured it out. I needed to edit the '/opt/plesk/php/8.1/etc/php.d/50-xdebug.ini' file with the xdebug params. Before in PHP 7.4 all you had to do was add it to the php.ini of your site via Plesk. But in this case did not work for PHP 8.1 on FPM.

user1110938
  • 153
  • 4
  • 11