PHPackages                             wolfulus/xdebug-toggle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. wolfulus/xdebug-toggle

ActiveProject[Templating &amp; Views](/categories/templating)

wolfulus/xdebug-toggle
======================

XDebug Toggle.

v0.2(5y ago)08MITPHPPHP &gt;=7.2

Since Jun 12Pushed 5y agoCompare

[ Source](https://github.com/WoLfulus/xdebug-toggle)[ Packagist](https://packagist.org/packages/wolfulus/xdebug-toggle)[ RSS](/packages/wolfulus-xdebug-toggle/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (2)Dependencies (10)Versions (3)Used By (0)

XDebug Toggle
=============

[](#xdebug-toggle)

Toggles PHP XDebug extensions.

How it works?
=============

[](#how-it-works)

This package detects where your `php.ini` file is located and creates two copies on the same folder with `-xdebug-enabled`and `-xdebug-disabled` suffix to them.

Any changes made to those files will reset because it keeps those files in sync whenever you run the commands.

In order to enable/disable XDebug, the package tries to identify the library name and location, like `xdebug.so` and `xdebug-2.9.4-7.4-vc15-nts-x86_64`) on the original `php.ini` file. You MUST have at least a line containing `zend_extension=...xdebug` on your original `php.ini` file in order for it to work, even if it's commented out with a `;`.

The `xdebug` command is just a wrapper over `php` executable that disables the original `php.ini` loading and loads one of the copies instead.

By running `xdebug [...php args]` you're running a PHP instance with XDebug `enabled`. The `xdebug` accepts a `--disable` flag immediately after the `xdebug` command if you want to run with it disabled. There's also two additional commands `xdebug-enabled` and `xdebug-disabled` that does the exact same thing but without the flags.

Installation
------------

[](#installation)

- `composer global require wolfulus/xdebug-toggle`

Usage
-----

[](#usage)

- `xdebug file.php`
- `xdebug --disable file.php`
- `xdebug-enabled file.php`
- `xdebug-disabled file.php`
- `xdebug -r "echo extension_loaded('xdebug') ? 'loaded' : 'not loaded';"`
- `xdebug --disable -r "echo extension_loaded('xdebug') ? 'loaded' : 'not loaded';"`
- `xdebug --help`

License
=======

[](#license)

MIT

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2164d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a87192ba5cdccfebcde0b2c392a93db792ae98b45dc009124a0e13b5354dfd52?d=identicon)[WoLfulus](/maintainers/WoLfulus)

---

Top Contributors

[![WoLfulus](https://avatars.githubusercontent.com/u/412397?v=4)](https://github.com/WoLfulus "WoLfulus (5 commits)")

---

Tags

template

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/wolfulus-xdebug-toggle/health.svg)

```
[![Health](https://phpackages.com/badges/wolfulus-xdebug-toggle/health.svg)](https://phpackages.com/packages/wolfulus-xdebug-toggle)
```

###  Alternatives

[phpoffice/phpword

PHPWord - A pure PHP library for reading and writing word processing documents (OOXML, ODF, RTF, HTML, PDF)

7.5k34.7M186](/packages/phpoffice-phpword)[rize/uri-template

PHP URI Template (RFC 6570) supports both expansion &amp; extraction

420137.3M46](/packages/rize-uri-template)[mopa/bootstrap-sandbox-bundle

Seperate live docs from code

256.8k](/packages/mopa-bootstrap-sandbox-bundle)[larablocks/pigeon

A more flexible email message builder for Laravel 5 including chained methods, reusable message configurations, and message layout and template view management.

143.7k](/packages/larablocks-pigeon)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
