View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001568 | Xdebug | Step Debugging | public | 2018-08-01 08:49 | 2018-08-01 12:13 |
| Reporter | mikadobrain | Assigned To | |||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 2.6.0 | ||||
| Target Version | 2.6.1 | Fixed in Version | 2.6.1 | ||
| Summary | 0001568: Can't debug object properties that have numeric keys | ||||
| Description | I'm using the php-ds extension. Whenever i put objects into an Ds\ object and try to inspect the object using xdebug remote debugging, i receive "cannot access property". My IDE is the PHPStorm version. | ||||
| Steps To Reproduce | <?php use Ds\Vector; $vector = new Vector(); $vector = new Vector(); class Foo
} | ||||
| Tags | No tags attached. | ||||
| Operating System | |||||
| PHP Version | 7.1.15-7.1.19 | ||||
|
|
I can reproduce this, but I am not 100% whether this is a bug in Xdebug. Xdebug relies on certain internal PHP APIs to fetch information about internal (as-in, from a PHP Extension) classes. As Vector is such a thing, it is quite possible that it doesn't implement all the proper APIs to make this possible. From a quick glance (https://github.com/php-ds/extension/blob/master/src/php/classes/php_vector_ce.c#L274) it doesn't implement the get_properties handler that Xdebug needs (https://github.com/xdebug/xdebug/blob/master/xdebug_var.c#L45). get_properties is also used with var_export(), which also doesn't work on the Vector object: <?php $vector = new Vector(); var_export($vector); produces: Ds\Vector::__set_state(array( Anyway, scratch that all. It's a bug in Xdebug :-) |
|
|
|
|
|
Dude, you are crazy. Anyways, thank you very much :) |
|
|
Fixed in GIT for Xdebug 2.6.1. |