The Interactive PHP Debugger
C PHP C++ Other
Permalink
Failed to load latest commit information.
tests Fix last commit, and do not output unnecessary information Oct 26, 2014
travis Merge sapi/phpdbg into PHP-5.6 Jun 15, 2014
.gdbinit Merge branch 'master' of sapi/phpdbg into PHP-5.6 Dec 20, 2013
.gitignore Merge sapi/phpdbg into PHP-5.6 Jun 9, 2014
.phpdbginit Merge branch 'master' of sapi/phpdbg into PHP-5.6 Dec 20, 2013
.travis.yml Merge phpdbg into PHP-5.6 Sep 15, 2014
CREDITS credits file for phpdbg Dec 23, 2013
Changelog.md Merge branch 'master' of sapi/phpdbg into PHP-5.6 Dec 20, 2013
Makefile.frag Merge sapi/phpdbg into PHP-5.6 Jul 5, 2014
README.md Merge phpdbg into PHP-5.6 Sep 15, 2014
config.m4 Merge phpdbg into PHP-5.6 Oct 28, 2014
config.w32 fix sapi/phpdbg/config.w32 Oct 29, 2014
phpdbg.1 Merge sapi/phpdbg into PHP-5.6 Jun 25, 2014
phpdbg.c Merge php-src into phpdbg Nov 4, 2014
phpdbg.h Allow connections over tcp sockets too (wait command) Nov 4, 2014
phpdbg.init.d Merge branch 'master' of sapi/phpdbg into PHP-5.6 Dec 20, 2013
phpdbg_bp.c Begin adding actual examples for illustration Nov 15, 2014
phpdbg_bp.h Remove the ugly hack via a temp file to store breakpoints Oct 28, 2014
phpdbg_break.c Merge phpdbg into PHP-5.6 Oct 24, 2014
phpdbg_break.h Merge sapi/phpdbg into PHP-5.6 Apr 21, 2014
phpdbg_btree.c Fix readline/libedit (Thanks to @remicollet) Jun 29, 2014
phpdbg_btree.h Fix readline/libedit (Thanks to @remicollet) Jun 29, 2014
phpdbg_cmd.c Stabilize execution, always run destructors and extended file breakpo… Oct 26, 2014
phpdbg_cmd.h remove dodgy param parser, bring userland breakpoint api inline with … Oct 26, 2014
phpdbg_eol.c Merge phpdbg into PHP-5.6 Oct 24, 2014
phpdbg_eol.h Merge phpdbg into PHP-5.6 Oct 24, 2014
phpdbg_frame.c Fix 5.4/5.5 build Nov 4, 2014
phpdbg_frame.h Update year Jan 17, 2014
phpdbg_help.c Merge phpdbg into PHP-5.6 Oct 24, 2014
phpdbg_help.h Merge phpdbg into PHP-5.6 Oct 24, 2014
phpdbg_info.c Merge phpdbg into PHP-5.6 Oct 24, 2014
phpdbg_info.h Merge phpdbg into PHP-5.6 Oct 24, 2014
phpdbg_io.c Fix possibly unclosed <stream> tags Oct 28, 2014
phpdbg_io.h Add question to reset execution in run/exec/clean Oct 26, 2014
phpdbg_lexer.c Merge phpdbg into PHP-5.6 Oct 24, 2014
phpdbg_lexer.h Merge sapi/phpdbg into PHP-5.6 Jun 9, 2014
phpdbg_lexer.l Merge phpdbg into PHP-5.6 Oct 24, 2014
phpdbg_list.c Stabilize execution, always run destructors and extended file breakpo… Oct 26, 2014
phpdbg_list.h Merge phpdbg into PHP-5.6 Oct 24, 2014
phpdbg_opcode.c Merge phpdbg into PHP-5.6 Oct 24, 2014
phpdbg_opcode.h Update year Jan 17, 2014
phpdbg_out.c Fix possibly unclosed <stream> tags Oct 28, 2014
phpdbg_out.h Merge phpdbg into PHP-5.6 Oct 24, 2014
phpdbg_parser.c remove dodgy param parser, bring userland breakpoint api inline with … Oct 26, 2014
phpdbg_parser.h remove dodgy param parser, bring userland breakpoint api inline with … Oct 26, 2014
phpdbg_parser.y Merge phpdbg into PHP-5.6 Oct 24, 2014
phpdbg_print.c Merge phpdbg into PHP-5.6 Oct 24, 2014
phpdbg_print.h Merge sapi/phpdbg into PHP-5.6 Apr 21, 2014
phpdbg_prompt.c Fix 5.4/5.5 build Nov 4, 2014
phpdbg_prompt.h Remove the ugly hack via a temp file to store breakpoints Oct 28, 2014
phpdbg_rinit_hook.c Allow connections over tcp sockets too (wait command) Nov 4, 2014
phpdbg_rinit_hook.h Merge phpdbg into PHP-5.6 Oct 24, 2014
phpdbg_set.c Merge phpdbg into PHP-5.6 Oct 24, 2014
phpdbg_set.h Merge sapi/phpdbg into PHP-5.6 Apr 21, 2014
phpdbg_sigio_win32.c Merge phpdbg into PHP-5.6 Oct 27, 2014
phpdbg_sigio_win32.h Merge phpdbg into PHP-5.6 Oct 27, 2014
phpdbg_sigsafe.c Merge phpdbg into PHP-5.6 Oct 24, 2014
phpdbg_sigsafe.h Merge phpdbg into PHP-5.6 Oct 24, 2014
phpdbg_utils.c Use smarter, half-expanded args in backtrace Nov 1, 2014
phpdbg_utils.h Use smarter, half-expanded args in backtrace Nov 1, 2014
phpdbg_wait.c Allow connections over tcp sockets too (wait command) Nov 4, 2014
phpdbg_wait.h Merge phpdbg into PHP-5.6 Oct 24, 2014
phpdbg_watch.c Merge phpdbg into PHP-5.6 Oct 24, 2014
phpdbg_watch.h Merge phpdbg into PHP-5.6 Oct 24, 2014
phpdbg_webdata_transfer.c Export sapi_module.phpinfo_as_text via wait Oct 31, 2014
phpdbg_webdata_transfer.h Merge phpdbg into PHP-5.6 Oct 24, 2014
phpdbg_win.c Merge sapi/phpdbg into PHP-5.6 Apr 21, 2014
phpdbg_win.h Merge sapi/phpdbg into PHP-5.6 Apr 21, 2014
test.php Merge sapi/phpdbg into PHP-5.6 Apr 21, 2014
web-bootstrap.php Merge branch 'master' of sapi/phpdbg into PHP-5.6 Dec 20, 2013
xml.md Begin adding actual examples for illustration Nov 15, 2014
zend_mm_structs.h Merge phpdbg into PHP-5.6 Oct 24, 2014

README.md

The interactive PHP debugger

Implemented as a SAPI module, phpdbg can exert complete control over the environment without impacting the functionality or performance of your code.

phpdbg aims to be a lightweight, powerful, easy to use debugging platform for PHP 5.4+

phpdbg on travis-ci

Features

  • Stepthrough Debugging
  • Flexible Breakpoints (Class Method, Function, File:Line, Address, Opcode)
  • Easy Access to PHP with built-in eval()
  • Easy Access to Currently Executing Code
  • Userland API
  • SAPI Agnostic - Easily Integrated
  • PHP Configuration File Support
  • JIT Super Globals - Set Your Own!!
  • Optional readline Support - Comfortable Terminal Operation
  • Remote Debugging Support - Bundled Java GUI
  • Easy Operation - See Help :)

Planned

  • Improve Everything :)

Installation

To install phpdbg, you must compile the source against your PHP installation sources, and enable the SAPI with the configure command.

cd /usr/src/php-src/sapi
git clone https://github.com/krakjoe/phpdbg
cd ../
./buildconf --force
./configure --enable-phpdbg
make -j8
make install-phpdbg

Where the source directory has been used previously to build PHP, there exists a file named config.nice which can be used to invoke configure with the same parameters as were used by the last execution of configure.

Note: PHP must be configured with the switch --with-readline for phpdbg to support history, autocompletion, tab-listing etc.

Command Line Options

The following switches are implemented (just like cli SAPI):

  • -n ignore php ini
  • -c search for php ini in path
  • -z load zend extension
  • -d define php ini entry

The following switches change the default behaviour of phpdbg:

  • -v disables quietness
  • -s enabled stepping
  • -e sets execution context
  • -b boring - disables use of colour on the console
  • -I ignore .phpdbginit (default init file)
  • -i override .phpgdbinit location (implies -I)
  • -O set oplog output file
  • -q do not print banner on startup
  • -r jump straight to run
  • -E enable step through eval()
  • -l listen ports for remote mode
  • -a listen address for remote mode
  • -S override SAPI name

Note: Passing -rr will cause phpdbg to quit after execution, rather than returning to the console.

Getting Started

See the website for tutorials/documentation

http://phpdbg.com