pebugger is an interactive command-line based debugger for PHP, written in PHP.
pebugger is an interactive command-line based debugger for PHP, written in PHPP, written in PHP. The project vaguely resembles gdb. Its basicaly a dbgp client.
This is currently in an early development stage. It's stable and usable, but not fully featured, yet. It's something I am keen to start using myself, so features should be added fairly quickly.
So far, you can set breakpoints, step through code, and query variables.
· PHP 5
· CLI support in PHP (it's enabled by default)
Install Xdebug by doing:
pecl install xdebug
[Xdebug only needs to be installed on the 'server' machine, not the one you're
running pebugger on, if different]
For more info: http://www.xdebug.org
Don't forget to add something like:
to your php.ini and also check the output of phpinfo() if it mentions Xdebug.
Have a look at http://www.xdebug.org/docs/remote on how to get Xdebug to connect to pebugger.
If you want bash-like line editing, tab-completion and command history, then
the readline extension has to be enabled, which is not by default. This isn't
available for Windows.
To do this, recompile PHP with either '--with-readline' or
'--with-readline=shared' added to the ./configure command. So, a good idea
would be to see what options you previously compiled PHP with by doing:
php -r 'phpinfo();' | grep 'Configure Command'
and add your --with-readline option to the list.
It might be worth having a look in /usr/lib/php for 'readline.so' before
doing this, just incase you already have it. If so, just enable it in your
See also: http://www.php.net/manual/en/ref.readline.php
If you will be debugging remotely, then just xdebug must be installed on the
'server', and readline installed only on the system pebugger is to be ran on.
Just copy it to wherever you want (say, /usr/local/share/pebugger)
then do something like:
ln -s /usr/local/share/pebugger/pebugger.php /usr/local/bin/pebugger
Make sure the first line of pebugger.php points to where your php is.
Default is /usr/bin/php
Type 'pebugger' to go!
· Accept connections only from certain hosts or ide keys: 'set accept/idekey'
· Can now start scripts from the debugger: the 'start' command. For now, this depends on the 'nohup' unix command.
· 'eval' command; evaluate some php code, on the server.
· 'alias' command.