home protocol f.a.q. downloads

What is PDB?

PDB is a PHP source-level debugger written entirely in PHP.

It uses the Zend debug protocol to communicate with the debugger front end, so that it can be used by any product implementing the protocol.

Motivation

PHP is a nice and easy-to-use language for web developers. It has everything needed to support developers during a software life cycle.

Unfortunately, not all components are free software or "open source". An open source IDE exists to help developers build PHP applications. It depends on an external debugger.

At the moment two PHP debuggers are available for eclipse:

  1. Zend offers a commercial debugger which is neither free software nor open source.
  2. The IDE can be configured to use the open source xdebug debugger.

An open source project like the PHP/Java Bridge should not depend on software which is not free for anyone to use.

We cannot recommend xdebug either, because it has evolved into an ecosystem of its own; it uses a complicated debug protocol (one-way XML, response is plain text), and its low-level C implementation is using obscure features of the Zend engine, which might not work in new versions of PHP. What's even worse is that its C implementation might crash the entire PHP installation (see xdebug's list of bugs or this bug report on our mailing list for details).

We decided to write an open-source debugger which uses Zend's well documented debug protocol and fix some of xdebug's design decisions as well:

  1. The debugger back end is written entirely in PHP. This means that even if the debugger contains a bug, it cannot crash the PHP installation.
  2. It is not necessary to install the debugger. PHP scripts can simply include PHPDebugger.php to connect to the debugger front end.
  3. The debugger does not support profiling. If you want to profile a script, use a profiler, not a debugger.