Download the PHP package mougrim/php-xdebug-proxy without Composer
On this page you can find all versions of the php package mougrim/php-xdebug-proxy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-xdebug-proxy
PHP xdebug (dbgp) proxy
This is amphp.
The idea is described in the document Multi-user debugging in PhpStorm with Xdebug and DBGp proxy.
The main benefit is that this proxy is written in php - the language you know.
Installation
This package can be installed as a Composer project:
Or dependency:
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):
Run
You can run next command:
The proxy will be run with default config:
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
If you want to configure listening ports, etc., you can use custom config path. Just copy config
directory to your custom path:
There are 3 files:
-
config.php
: logger.php
: you can customize a logger, the file should return an object, which is instance of\Psr\Log\LoggerInterface
;Factory\Factory
.
Then change configs and run:
Extending
As mentioned Factory\DefaultFactory
factory is used.
The most powerful are the request preparers. You can override Factory\DefaultFactory::createRequestPreparers()
. It should return an array of objects which implement RequestPreparer\RequestPreparer
interface.
Request preparers will be called:
- on request to ide from first to last
- on request to xdebug from last to first
You can use request preparer for example for changing path to files (in break points and execution files).
Good example of the request preparer is Factory\SoftMocksFactory
.
Using with soft-mocks
For soft-mocks you can use softMocksConfig
config directory:
If you you want to provide path to custom soft-mocks
init script, then copy config.php
:
For more information see doc in soft-mocks project.
Thanks
Many thanks to Eelf for proxy example smdbgpproxy.
Thanks to Dmitry Ananyev for help with docs.