Simple CLI tools to toggle xdebug easily.

1.0.0 2017-06-21 13:49 UTC

This package is auto-updated.

Last update: 2023-03-10 23:06:55 UTC


Build Status

Xdebug Toggle

A PHP-based CLI tool for quickly enabling and/or disabling xdebug.

This tool simply "comments out" the line in your php.ini file that loads the xDebug Zend extension.

Available commands:

Command Description
toggle Enables or disables xDebug, depending on state.
enable Enables xDebug.
disable Disables xDebug.
status Prints current status of xDebug.


xdebug toggle
xdebug enable
xdebug disable
xdebug status


You may use Composer to install this library. It is suggested that you install it globally and add Composer's global bin directory to your system's $PATH.

composer global require grasmash/xdebug-toggle --update-no-dev


If your extension doesn't match the name (e.g. you're on Windows), you can set a environment variable to correct file name: XDEBUG_EXTENSION_FILE_NAME.