View Issue Details

IDProjectCategoryView StatusLast Update
0002377XdebugUncategorizedpublic2025-10-26 14:10
ReporterHypeMC Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Summary0002377: Debugger shows "Collecting data..." indefinitely after a lazy object is reset
Description

Product version is 3.4.7-dev, but it's not in the select menu.

When a lazy object is reset, the PHPStorm debugger gets stuck displaying "Collecting data..." and no variables are shown.

Here's a simple example:

class Example
{
    public function __construct(public int $prop)
    {
        echo __METHOD__, "\n";
    }
}

class Foo
{
    public function foo($lazyObject)
    {
        var_dump($lazyObject->prop);

        $reflector = new ReflectionClass(Example::class);
        $reflector->resetAsLazyGhost($lazyObject, function ($object) {
            // Initialize object in-place
            $object->__construct(2);
        });

        var_dump($lazyObject);
    }
}

$reflector = new ReflectionClass(Example::class);

$lazyObject = $reflector->newLazyGhost(function (Example $object) {
    // Initialize object in-place
    $object->__construct(1);
});

new Foo()->foo($lazyObject);
Steps To Reproduce
  1. Set a breakpoint immediately after the lazy object is reset.
  2. Start debugging.
  3. When execution pauses, the debugger displays "Collecting data..." indefinitely and no variables appear (see image).
TagsNo tags attached.
Attached Files
image_3.png (77,499 bytes)   
image_3.png (77,499 bytes)   
Operating SystemUbuntu 22.04
PHP Version8.4.10-8.4.19

Activities

Issue History

Date Modified Username Field Change
2025-10-26 14:10 HypeMC New Issue
2025-10-26 14:10 HypeMC File Added: image_3.png