|
2 | 2 | title: Debug Protocol |
3 | 3 | --- |
4 | 4 |
|
5 | | -PHP Debugger speaks the DBGp protocol, making it compatible with any IDE or tool that speaks DBGp. |
| 5 | +The debugger and your editor talk to each other over **DBGp**, a debugging protocol |
| 6 | +originally designed for PHP and now spoken by every PHP debugging client worth |
| 7 | +using. |
| 8 | + |
| 9 | +That is why there is no editor plugin to install for PHP Debugger specifically. |
| 10 | +Your editor already knows how to hold a DBGp conversation; the debugger connects to |
| 11 | +it and they understand one another. Anything that could already debug PHP can debug |
| 12 | +your code here, with no adapter in between. |
| 13 | + |
| 14 | +Mechanically it is a small thing: a TCP connection opened by the debugger, carrying |
| 15 | +XML messages in both directions. The editor asks — set a breakpoint here, step over, |
| 16 | +give me the value of `$order` — and the debugger answers. Everything the |
| 17 | +[User Guide](../user-guide/starting-the-debugger.md) describes is that conversation |
| 18 | +under a friendlier name. |
| 19 | + |
| 20 | +## The specification |
| 21 | + |
| 22 | +The protocol is documented in full at |
| 23 | +[xdebug.org/docs/dbgp](https://xdebug.org/docs/dbgp) — every command, its arguments |
| 24 | +and the shape of its response. |
| 25 | + |
| 26 | +You do not need any of it to use the debugger. It is worth reading if you are |
| 27 | +building a client, debugging a client, or trying to work out why your editor and the |
| 28 | +debugger disagree about something — for which the raw message log at |
| 29 | +[level 5](./settings.md#php_debuggerlog_level) is the other half of the answer. |
| 30 | + |
| 31 | +## Compatibility |
| 32 | + |
| 33 | +PHP Debugger currently implements DBGp version 1.0 as specified, with no |
| 34 | +deliberate differences. If your editor works with the protocol, it works here. |
| 35 | + |
| 36 | +:::info[This may not always be exactly true] |
| 37 | + |
| 38 | +Keeping the protocol unchanged is a deliberate choice for now, not a permanent |
| 39 | +commitment. Some improvements we would like to make are difficult to express within |
| 40 | +the specification as it stands, and we may eventually add to it or diverge from it |
| 41 | +where the benefit is worth the cost. |
| 42 | + |
| 43 | +Anything of that kind would be documented here, and compatibility with existing |
| 44 | +clients is something we intend to keep rather than break casually. |
6 | 45 |
|
7 | | -:::note |
8 | | -This page is a work in progress — full documentation is coming soon. |
9 | 46 | ::: |
0 commit comments