Is phpstrom debug bugs? php script miss class property in variables windows

Answered

Hi, guys.

When i try debug this example: https://github.com/amphp/amp/blob/master/examples/coroutines/concurrency.php#L2  and set a breakpoint at https://github.com/amphp/amp/blob/master/lib/Loop/NativeDriver.php#L52 , but i can not find some object propertys(eg: now) in the variables windows.

 

My phpstorm version is 2019.1 and xdebug version is 2.7.1.

8 comments
Comment actions Permalink

Hi, Dmitry Tronin

I have tried but could not find it.

Maybe it's a xdebug problem.

Thank you.

0
Comment actions Permalink

Hi!

I just had a look, and this is not an Xdebug problem per-sé. The inherited Driver class implements a __debugInfo() method which does not return the object's standard properties, but instead a different set: https://github.com/amphp/amp/blob/master/lib/Loop/Driver.php#L624-L650 — and that is the set that PhpStorm through Xdebug shows in its variable panel.

I'm not quite sure how to address this, but I've filed a ticket: https://bugs.xdebug.org/view.php?id=1662

cheers,

Derick

1
Comment actions Permalink

@910626

If you cannot see "now" field anywhere in Xdebug log ... report that to Xdebug author at http://bugs.xdebug.org/ , at least there you can get a definite answer if it's a bug or some else (based on your screenshot those fields should be listed there).

 

P.S.

1) I see exactly the same in 2019.1.1 and PHP 7.2.17 with Xdebug 2.7.1. Xdebug 2.6.1 with PHP 7.0.33  adds few other fields (as different "CallableMaker" trait is used).. but still no "now" visible.

2) If you add `$this->now` to watches you will be able to see it's value once it's assigned.

3) Xdebug log reports only 8 children. PhpStorm shows correct info here.

<property name="$this" fullname="$this" type="object" classname="Amp\Loop\NativeDriver" children="1" numchildren="8" page="0" pagesize="100">

Maybe some specific option needs to be set (no ideas)?

 

2
Comment actions Permalink

Oh .. it has been already discovered what's causing it

Took me time to test it myself and forgot to refresh the page before posting...

0
Comment actions Permalink

@derick Thank you for your attention to this matter. I do appreciate it.

1
Comment actions Permalink

@andriy Bazanov Thank you for taking the trouble to help me. I do appreciate it.

0
Comment actions Permalink

This is fixed in the just released Xdebug 2.7.2: https://xdebug.org/#2019_05_06

1

Please sign in to leave a comment.