pebugger is an interactive command-line based debugger for PHP, written in PHP. It 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.
Here's a sample session:
$ pebugger
pebugger 0.2, Copyright (C) 2007 Steven Grundell.
pebugger comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to change and/or distribute copies of it under certain conditions.
Type 'about' for more details.
Debugger connected [127.0.0.1]
Xdebug 2.0.0RC4 - http://xdebug.org - Copyright (c) 2002-2007 by Derick Rethans
Status set to 'break'
Break in function {main}:
2: echo("hello\n");
-> break 16
Breakpoint 1 set: file:///tmp/a.php:16
-> run
hello
Break in function two:
16: $n++;
-> list
11: function two($n)
12: {
13: $num = 5;
14: $a = Array('lemon', 'apple', 'orange', 'pear');
15: $str = 'hello';
16: $n++;
17: return three($n);
18: }
19:
20: function three($n)
21: {
-> echo $a[2]
"orange"
-> exit
$
|