[xdebug-general] Re: Watch a PHP variable as XDebug Breakpoint

From: Stefano D. Mtangoo <mwinjilisti[@]gmail.com>
Date: Wed, 29 Jan 2014 00:42:43 +0300

On 28/01/2014 12:34 alasiri, Derick Rethans wrote:
> On Sat, 25 Jan 2014, Stefano D. Mtangoo wrote:
>
>> Iam using DBGp protocol to communicate with XDebug and so far its
>> great. I can break on specific line numbers with no difficulty. I
>> tried to make a watch and got error |breakpoint "type is not
>> supported"|, which is clear that XDebug currently does not implement
>> it. What made me ask this is, I have seen many IDEs with this feature
>> (Eclipse included) and wondered how do they implement it. I want to
>> watch expression like
>>
>> |$criteria = new CDbCriteria();
>> |
>>
>> I want IDE to break there so that I can update a watch window with new value.
> I think what they do is to just use "property_get" for all the watches
> whenever a breakpoint happens. You can similate this by setting a
> breakpoint on the line (after the line of code), and then calling
> property_get yourself.
Now this is great Idea. But since am still learning the protocol I need
help to understand it better.
For the above case I will request property_get passing $criteria as
requested property and it should work
But what if the thing am watching is rather expression, something like
$x = $y+$z*$r where I want to watch expression
$y+$z*$r not $x. In such cases whats your advice?

Thanks a lot,
Stefano
>
> cheers,
> Derick
>

-- 
Stefano D. Mtangoo
Mob: +255 754710410
Twitter: @mtangoo
Web. http://hosannahighertech.co.tz
Linkedin: http://www.linkedin.com/pub/stefano-mtangoo/45/644/281
/The purpose of man is to know his Maker Be known by his Maker
And make his Maker known So that others may know his Maker as their 
Maker(Emeal Zwayne) /
Received on Tue Jan 28 2014 - 21:42:54 GMT

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