Download the PHP package zeloc/xdebugtoggle without Composer
On this page you can find all versions of the php package zeloc/xdebugtoggle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zeloc/xdebugtoggle
More information about zeloc/xdebugtoggle
Files in zeloc/xdebugtoggle
Package xdebugtoggle
Short Description PHP 8.4 version. This is a console command to toggle xdebug on and off with debug and coverage mode
License mit
Informations about the package xdebugtoggle
Zeloc Xdebug Toggle (Magento 2)
Magento 2 module that adds a CLI command to toggle Xdebug between debug and coverage modes by updating the Xdebug INI file and restarting PHP-FPM.
Requirements
- PHP
~8.4.0(fromcomposer.json) - Magento 2 module environment
- Permission to write to
/etc/php/<version>/mods-available/xdebug.ini - Permission to run
sudo service php<version>-fpm restart
Install
Then enable and upgrade in Magento as usual:
Command
--mode=dtoggles Debug mode (xdebug.mode=debug)--mode=ctoggles Coverage mode (xdebug.mode=coverage)
If --mode is missing or invalid, the command returns a non-zero exit code.
PHP Version Source
The command reads the PHP version from Magento config path:
zeloc_xdebugtoggle/php/version
Default in etc/config.xml:
8.3
The computed target INI path is:
/etc/php/<version>/mods-available/xdebug.ini
Generated Xdebug Settings
When enabled in debug mode, the module writes:
zend_extension=xdebug.soxdebug.mode=debugxdebug.client_port=9003xdebug.ide_key=PHPSTORMxdebug.discover_client_host=0xdebug.client_host=localhostxdebug.log=/var/log/xdebug.log
When enabled in coverage mode, the module writes:
zend_extension=xdebug.soxdebug.mode=coverage
When disabled, zend_extension is omitted.
Notes
- This module edits a system PHP config file; run the command with appropriate permissions.
- Restarting PHP-FPM is required for changes to take effect.
- For containerized environments, you may need to adjust
xdebug.client_hostand discovery behavior.