View Issue Details

IDProjectCategoryView StatusLast Update
0001662XdebugStep Debuggingpublic2021-04-21 08:20
Reporterderick Assigned Toderick  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version2.7.1 
Fixed in Version2.7.2 
Summary0001662: __debugInfo should not be used for user-defined classes
DescriptionWhen a user-defined class implements the __debugInfo() method, Xdebug will use that instead of introspecting the object's real properties. This is confusing for users as they can't see what happens.

Instead of using __debugInfo() for all objects, it should only be used for internal PHP classes/objects.

From: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360003468979-Is-phpstrom-debug-bugs-php-script-miss-class-property-in-variables-windows
TagsNo tags attached.
Operating System
PHP Version7.3-dev

Relationships

has duplicate 0001966 closedderick Xdebug doesn't respect __debugInfo() method 

Activities

derick

2019-05-06 12:09

administrator   ~0005019

Fixed in GIT: https://github.com/xdebug/xdebug/pull/469

jsiefer

2019-10-16 17:04

reporter   ~0005175

I actually liked the idea of having an option to provide custom property list. I used it to provide the most important properties and then always gave a back a "properties" where you could see the actual list of all properties.

I was wondering if there is maybe an alternative option doable where you could provide a custom quick view of a class that a IDE could understand.

So I do understand how it is confusing if you are not aware of that.

derick

2021-04-21 08:19

administrator   ~0005853

There is a workaround for this, which is to set a watch called "$this->__debugInfo()". Setting watches is supported by many IDEs.

If you want to see the "debugInfo" of all object, please ask your IDE producer to include functionality to call this method on every object.

Issue History

Date Modified Username Field Change
2019-05-01 10:01 derick New Issue
2019-05-01 10:01 derick Product Version 2.7.0dev => 2.7.1
2019-05-06 12:09 derick Assigned To => derick
2019-05-06 12:09 derick Status new => closed
2019-05-06 12:09 derick Resolution open => fixed
2019-05-06 12:09 derick Fixed in Version => 2.7.0dev
2019-05-06 12:09 derick Note Added: 0005019
2019-05-06 15:46 derick Fixed in Version 2.7.0dev => 2.7.2
2019-10-16 17:04 jsiefer Note Added: 0005175
2020-03-12 16:33 derick Category Remote Debugging => Step Debugging
2021-04-21 08:19 derick Note Added: 0005853
2021-04-21 08:20 derick Relationship added has duplicate 0001966