PHPackages                             mougrim/php-xdebug-proxy - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. mougrim/php-xdebug-proxy

ActiveProject[Debugging &amp; Profiling](/categories/debugging)

mougrim/php-xdebug-proxy
========================

Xdebug (dbgp) proxy

0.7.0(2mo ago)911.7k↓50%8MITPHPPHP &gt;=8.2CI passing

Since Jun 21Pushed 2mo ago5 watchersCompare

[ Source](https://github.com/mougrim/php-xdebug-proxy)[ Packagist](https://packagist.org/packages/mougrim/php-xdebug-proxy)[ RSS](/packages/mougrim-php-xdebug-proxy/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (15)Used By (0)

PHP xdebug (dbgp) proxy
-----------------------

[](#php-xdebug-dbgp-proxy)

This is [expandable](#extending) [dbgp](https://xdebug.org/docs-dbgp.php) xdebug proxy based on [amphp](https://amphp.org/).

The idea is described in the document [Multi-user debugging in PhpStorm with Xdebug and DBGp proxy](https://confluence.jetbrains.com/display/PhpStorm/Multi-user+debugging+in+PhpStorm+with+Xdebug+and+DBGp+proxy#Multi-userdebugginginPhpStormwithXdebugandDBGpproxy-HowdoesXdebugwork%3F).

The main benefit is that this proxy is written in php - the language you know.

[![Latest Stable Version](https://camo.githubusercontent.com/3e6ca6ce2a6c602d3555b2d0c19ecb3147a13fafaa42572ee7d80cc21313dd52/68747470733a2f2f706f7365722e707567782e6f72672f6d6f756772696d2f7068702d7864656275672d70726f78792f76657273696f6e)](https://packagist.org/packages/mougrim/php-xdebug-proxy)[![Latest Unstable Version](https://camo.githubusercontent.com/6aba935985e9266bf6e4521a5025eca6148dd986d5f1a06fbf01d470d5db84fc/68747470733a2f2f706f7365722e707567782e6f72672f6d6f756772696d2f7068702d7864656275672d70726f78792f762f756e737461626c65)](https://packagist.org/packages/mougrim/php-xdebug-proxy)[![License](https://camo.githubusercontent.com/4b11f71cecb551d2598073b7f18679f69d7ec545aafd32d4f5d5aad838399011/68747470733a2f2f706f7365722e707567782e6f72672f6d6f756772696d2f7068702d7864656275672d70726f78792f6c6963656e7365)](https://packagist.org/packages/mougrim/php-xdebug-proxy)[![Unit tests status](https://github.com/mougrim/php-xdebug-proxy/actions/workflows/unit-tests.yml/badge.svg?branch=master&event=push)](https://github.com/mougrim/php-xdebug-proxy/actions?query=branch%3Amaster)

### Installation

[](#installation)

This package can be installed as a [Composer](https://getcomposer.org/) project:

```
composer.phar create-project mougrim/php-xdebug-proxy
```

Or dependency:

```
composer.phar require mougrim/php-xdebug-proxy --dev
```

For parse XML you should install `ext-dom`.

For write logs by default you should install `amphp/log` (use `--dev` if you installed `php-xdebug-proxy` as dependency):

```
composer.phar require amphp/log '^1.0.0'
```

### Run

[](#run)

You can run next command:

```
bin/xdebug-proxy
```

The proxy will be run with default config:

```
Using config path /path/to/php-xdebug-proxy/config
[2019-02-14 10:46:24] xdebug-proxy.NOTICE: Use default ide: 127.0.0.1:9000 array ( ) array ( )
[2019-02-14 10:46:24] xdebug-proxy.NOTICE: Use predefined ides array (   'predefinedIdeList' =>    array (     'idekey' => '127.0.0.1:9000',   ), ) array ( )
[2019-02-14 10:46:24] xdebug-proxy.NOTICE: [Proxy][IdeRegistration] Listening for new connections on '127.0.0.1:9001'... array ( ) array ( )
[2019-02-14 10:46:24] xdebug-proxy.NOTICE: [Proxy][Xdebug] Listening for new connections on '127.0.0.1:9002'... array ( ) array ( )

```

So by default proxy listens `127.0.0.1:9001` for ide registration connections and `127.0.0.1:9002` for xdebug connections, use `127.0.0.1:9000` as default IDE and predefined IDE with key `idekey`.

### Config

[](#config)

If you want to configure listening ports, etc., you can use custom config path. Just copy [`config`](config) directory to your custom path:

```
cp -r /path/to/php-xdebug-proxy/config /your/custom/path
```

There are 3 files:

- [`config.php`](config/config.php): ```
