logo       

Re: DBGp - Eval, property_get, & property_value: msg#00013

Subject: Re: DBGp - Eval, property_get, & property_value
Just posting the update/resolution...I did get my watch window to work just how I wanted it to. Once I downloaded the newest snapshot, eval started working (although I can still get it to crash php.exe if I give it some bad input), and I was able to get the functionality I wanted.

Thanks!
Jared

----- Original Message ----- From: "Derick Rethans" <derick@xxxxxxxxxx>
To: "Jared Phelps" <jared@xxxxxxxxxxxxx>
Cc: <xdebug-general@xxxxxxxxxxxxxxxx>
Sent: Saturday, April 15, 2006 2:05 PM
Subject: [xdebug-general] Re: DBGp - Eval, property_get, & property_value


On Sat, 15 Apr 2006, Jared Phelps wrote:

First and foremost, AMAZING work on this extension and the DBGp
protocol Derick.  All hail.

You're welcome :)

I'm writing a PHP IDE using XDebug and the DBGp protocol.

Might I inquire which IDE this is, and whether it will be open/free?

I have the basic start, stop, and set breakpoints working, and am
currently implementing a "watch window" feature.  I just can't seem to
get the behavior I'm looking for.  I get the feeling that "eval" is a
bit better suited to the functionality of a watch window (since in
some IDEs you can do things like $x = 1 via watch).  But that only
sends me back a property address.  Then I can't get at the property
contents because I don't have a long name to ask for, only the
address.

eval is basically a one-shot call without any state... so you can only
use it to get basic return types. eval isn't meant for retrieving
variables or data. You should use property_get/property_value for that.


So given the code below, I set the breakpoint at the line "$y = 7".
<?php
$z = new Test();
$x = 3;
$y = 7;
class Test
{
 var $y = 2,$x = 3;
}
?>

 How can I get the value of $z, and all its children? In the debug
 client, property_value gives me this:

<response command="property_value" transaction_id="jared"
type="object" children="1" classname="test"
numchildren="2"></response>

Useful stuff, but how would I get the rest of the children?

This was a bug which I fixed 2 or 3 days ago. This bug would prevent
from any children of an object to show up.
(http://bugs.activestate.com/show_bug.cgi?id=45484)

Similarly, how would I do function calls, assignments, and so-on with
"watch window like" functionality?  The dbgp documentation is pretty
good, but a little lacking on these points.  Sorry if it's in there
and I missed it somehow.

You'll have to clarify this a bit better, as I'm not sure what you're
trying to do here.

regards,
Derick
--
Xdebug | http://xdebug.org | xdebug-general@xxxxxxxxxxxxxxxx








<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe