View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002384 | Xdebug | Step Debugging | public | 2025-11-10 15:34 | 2025-11-10 16:18 |
| Reporter | staabm | Assigned To | derick | ||
| Priority | normal | Severity | feature | Reproducibility | always |
| Status | assigned | Resolution | open | ||
| Product Version | 3.4.6 | ||||
| Summary | 0002384: customize variable representation in PHPStorm | ||||
| Description | when step debuggin the phpstan-src codebase there are a few types which are ubiquitous. it would be great, if php userland source code could customize the "description" of variables in the "Threads & Variables"-debug-panel, so we can provide information which is most often required and the developer don't need to constantly expand/collapse variable types. I would imagine someting similar, we can do with __debugInfo() and var_dump(). so for example, I would want to see the value "cat1" of a PHPStan\Type\Constant\ConstantStringType variable, without the need of expanding it in said panel. | ||||
| Steps To Reproduce | put a break-point into PHPStan\Type\Constant\ConstantArrayTypeBuilder::__construct() and look for the $isList parameter (a TrinaryLogic object). | ||||
| Additional Information | I can imagine it could work by implementing a new "magic-"method on the corresponding class, e.g. a | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Operating System | |||||
| PHP Version | 8.4.10-8.4.19 | ||||
|
|
There might be situations where when Xdebug is in "break" mode, it's not possible to call functions safely. But it is also hard to know up front which situations this can be in. I think I would like to put this behind a feature flag — but that means that IDEs will need to add support for opting in, into this. |
|
|
I think the description would be in addition to existing properties, but it would be shown to the user even before the object is expanded. see screenshot, which depicts the example of a TrinaryLogic property type: I would expect the "additional description" object be printed right beside the property which has this type.
I would be fine with any scalar type. as soon as we start adding complex information, like arrays etc. we would likely get visual problems, because there is not enough room for printing such data
I don't think so. I am usually searching such information in the "Threads & Variables" panel
never used this utility. I have no opinion on this one. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2025-11-10 15:34 | staabm | New Issue | |
| 2025-11-10 15:34 | staabm | File Added: screenshot.png | |
| 2025-11-10 16:06 | derick | Assigned To | => derick |
| 2025-11-10 16:06 | derick | Status | new => feedback |
| 2025-11-10 16:06 | derick | Note Added: 0007401 | |
| 2025-11-10 16:06 | derick | Note Edited: 0007401 | |
| 2025-11-10 16:07 | derick | Note Edited: 0007401 | |
| 2025-11-10 16:18 | staabm | Note Added: 0007402 | |
| 2025-11-10 16:18 | staabm | File Added: grafik.png | |
| 2025-11-10 16:18 | staabm | Status | feedback => assigned |