[xdebug-general] I want to use eval

From: Ryan Hughes <ryan[@]iheartryan.com>
Date: Wed, 27 Aug 2008 11:55:13 -0400 (EDT)

Hi. I'm trying to write a dbgp client that has a command-line. I'm
probably an old-schooler, but I like that kind of debugger. gdb and all

My most common thing to do is to step around and then evaluate
expressions. Not just poking the value of variables, but evaluating

Naturally, I want the "eval" function to work as expected. Unfortunately,
it seems to have some arbitrary restrictions on it:
         * You can only eval in the top stack frame.
         * You can't drill in to the eval results, because there's no
           longname to use.

From some of the mailing list traffic I found, from two years ago, it
seems that "eval" is not the preferred way of getting data, and that
property_get is supposed to be the way.

Of course, property_get only works if you are trying to get the value of
an existing variable, not if you're trying to evaluate an expression. My
users (especially me) would find it confusing to be able to evaluate only
certain expressions. If I see that my program is about to do:

why must I type "eval $itemno" ; "eval $items[32]" rather than "eval

Well, the list traffic I saw was from a couple of years ago. I also heard
legends that the dpbp protocol documentation may be out of date. So I'm
hoping that a secret answer to my problems already exists.

If not, I will have to add this functionality to xdebug, and would like
to hash out the protocol details in advance, to increase the chances of it
getting accepted.


Received on Wed Aug 27 2008 - 18:01:23 BST

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST