How to Install Xdebug with PIE and Keep It Off in Production
Xdebug's install page now marks PECL as deprecated and recommends installing via PIE with the command pie install xdebug/xdebug. PIE compiles the extension from source on Linux and macOS, so build tools and PHP development headers are required, while Windows uses a prebuilt binary. The installer writes the zend_extension line into a configuration file and loads it after OPcache, so php.ini does not need manual editing. Xdebug's features are controlled by xdebug.mode, and enabling unnecessary modes can noticeably slow PHP, so users should restrict them to where they are needed. The guide also shows how to set options in a separate local ini file and use the XDEBUG_MODE environment variable for targeted runs such as CI coverage.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in