If you find Xdebug useful, please consider supporting the project.

DBGp Proxy Tool

This tool allows you to proxy and route debugging request to IDEs depending on which IDE key is in use.

Installation

A binary for Linux, macOS, and Windows is available on the downloads page. You only have to download the binary, which you can then run from a command line.

Command Line Options

The following command line options are available:

-h Show this help
-c host:port
--client host:port
Specify the port to listen on for IDE (client) connections [localhost:9001].
-s host:port
--server host:port
Specify the port to listen on for debugger engine (server) connections [localhost:9000].
-v Show version number and exit

Usage

To start the client on the command line on Linux, open a shell, and then run:

./dbgpProxy

If the binary doesn't start or you get a not found message, please refer to this FAQ entry.

To start the client on the command line on Linux, open a shell, and then run:

./dbgpProxy-macos

On Windows, open a command a Command Prompt and run:

dbgpProxy.exe

In all cases, you can add the command line options as described above.

When the proxy starts, it shows some version information. It will then wait until a connection is made to it by a debugging engine (such as Xdebug):

Xdebug DBGp proxy (0.2)
Copyright 2020 by Derick Rethans
Proxy started
Started client server on 127.0.0.1:9001
Started server server on 127.0.0.1:9000
Started server-ssl server on 127.0.0.1:9030
Started client-ssl server on 127.0.0.1:9031

When a client registers itself with the proxy it displays the IDE Key and where to reach that client:

- Start new client connection from 127.0.0.1:58226
  - Added connection for IDE Key 'derick': 127.0.0.1:9900
- Closing client connection from 127.0.0.1:58226

At this point the client should be ready to take incoming debugging connections to its registered port (127.0.0.1:9900 in this example).

You can stop the proxy by pressing Ctrl-C in its terminal. Once all debugging connections are closed, the proxy service will stop.