https://github.com/arnaud-lb/phpenv-xdebug
phpenv plugin to enable xdebug when XDEBUG_MODE is non empty
https://github.com/arnaud-lb/phpenv-xdebug
Last synced: 4 months ago
JSON representation
phpenv plugin to enable xdebug when XDEBUG_MODE is non empty
- Host: GitHub
- URL: https://github.com/arnaud-lb/phpenv-xdebug
- Owner: arnaud-lb
- License: mit
- Created: 2022-02-18T09:21:49.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-08T15:58:13.000Z (over 3 years ago)
- Last Synced: 2025-01-10T19:23:23.615Z (5 months ago)
- Language: Shell
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# phpenv xdebug plugin
This plugin will automatially enable Xdebug when you need it.
It works by adding `-dzend_extension=xdebug.so` to your `php` command when the `XDEBUG_MODE` environment variable is set to a non empty value.
## Install
```console
$ cd ~/.phpenv/plugins
$ git clone https://github.com/arnaud-lb/phpenv-xdebug.git# Disable xdebug by default
$ sed -i 's/^zend_extension=.*xdebug/;&/' ~/.phpenv/versions/*/etc/conf.d/xdebug.ini
```## Example
```console
# Xdebug is not loaded by default
$ php -m | grep Xdebug# Xdebug is loaded when XDEBUG_MODE is non empty
$ XDEBUG_MODE=debug php -m | grep Xdebug
Xdebug
```