As I wrote in my last post, I just installed Xdebug and Geben 0.26, and
I really like Geben. But I've encountered a few problems related to
displaying values of variables.
_Problem #1:_ In some code I'm trying to step through, I have an
associative array, and the value of one of its elements is another
associative array. Consider the following PHP code:
$x["a"] = array(
"abc" => 1,
"def" => "ghi",
3 => 55
$x["b"] = 2;
$x["c"] = "another value";
If I try to examine $x with the "e" command (geben-eval-expression),
it doesn't show me the value of $x["a"]. Instead it displays:
(("a") ("b" . 2) ("c" . "another value"))
I can see the whole thing with the "v" command
(geben-display-context), but that has a different problem.
_Problem #2:_ I had the context buffer (that you display with the
"v" command (geben-display-context)) displayed in one Emacs window
and the code I was stepping through in another Emacs window. I
wanted to be able to step through the code and watch the values in
the context buffer change. But the variables I wanted to watch were
near the bottom of the buffer down below the bottom of the window,
and whenever I single-stepped ("i" (geben-step-into) or "o"
(geben-step-over)) in the buffer containing the PHP code, the
context buffer would reposition to the top. So, instead of being
able to repeatedly type "o" and watch the results appear in the
context buffer, each time I typed "o", I had to follow it with C-x
o, then type C-v while staring at the context buffer to see if the
variable I was interested in had scrolled into range. That's
distracting enough that it makes it hard to keep track of what I was
How hard would it be to change the code that updates the context
buffer to make it remember the position of things before the update
and restore that after the update? The things that would need to be
remembered and restored are:
1) The line that was displayed at the top of the window.
2) The position of the cursor in the window.