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.
PHP is a nice and easy-to-use language for web developers. It has everything needed to support developers during a software life cycle.
At the moment two PHP debuggers are available for eclipse:
- Zend offers a commercial debugger which is neither free software nor open source.
- 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).
- 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.
- It is not necessary to install the debugger. PHP scripts can simply include PHPDebugger.php to connect to the debugger front end.
- The debugger does not support profiling. If you want to profile a script, use a profiler, not a debugger.