Articles in this section

How to enable Step Debugger on PHP on a Plesk server?

kb: how-to Plesk for Linux

Applicable to:

  • Plesk for Linux

Question

How to enable XDebug's Step Debugger on PHP on a Plesk server?

Answer

Warning: The following set of instructions include the restart of a service. Consider restarting during maintenance hours to minimize downtime.

  1. Log into Plesk

  2. Ensure that XDebug as an extension is enabled at Tools & Settings > PHP Settings > PHP version (e.g. 8.3).

  3. Add the XDebug configuration to the 50-xdebug.ini file. It's located at /opt/plesk/php/<php_version>/etc/php.d/50-xdebug.ini. Common configuration include:

    ; Enable xdebug extension module
    zend_extension=xdebug.so
    xdebug.mode=debug,develop
    xdebug.client_host=127.0.0.1
    xdebug.client_port="9003"

  4. Restart PHP service:

    # systemctl restart plesk-php83-fpm

    Note: Change the number in case it's a different PHP version.

Was this article helpful?

Comments

1 comment
Date Votes
  • Thank you. I was expecting to be able to use the “Additional directives” in the PHP settings of the website, but it seems that xdebug.mode=debug does not fully work there (phpinfo reports it in the settings, but the features enabled show Step debugging as disabled).

    0

Please sign in to leave a comment.