[xdebug-general] eval seems to always give "error evaluating code"

From: Ben Dilts <beandog[@]gmail.com>
Date: Mon, 17 Apr 2006 22:17:50 -0600

I've just started working with XDebug today, and I'm grateful that it's been
so programmer-friendly. I've been having a little difficulty with the eval
command, though. Here is a log of the network information in a simple
exchange with the debug server:

DBG: <init fileuri="file:///C%3A%5CApache2%5Chtdocs%5Cindex.php"
language="PHP" protocol_version="1.0" appid="1040" idekey="test"><engine
version="2.0.0beta5"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick
Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright
(c) 2002-2005 by Derick Rethans]]></copyright></init>
IDE: eval -i 1 -- echo 'hello';
DBG: <response command="eval" transaction_id="1" status="starting"
reason="ok"><error code="206"><message><![CDATA[error evaluating
code]]></message></error></response>

... etc.

Unless I'm mistaken (that's happened once before), if I simply do eval("echo
'hello';") in PHP, it executes that code and sends the string 'hello' to the
HTTP response. I think I must be misreading the documentation, but the
format is given as this:

eval -i transaction_id -- {DATA}

I even tried putting {} brackets around my eval'ed statement, in case they
were literal in the docs. I've tried the same command when the script is
halted partway through execution, with the same result. I'm missing
something fundamental here, I'm sure. What is it?

Thanks,

Ben Dilts
Received on Tue Apr 18 2006 - 06:18:25 BST

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