View Issue Details

IDProjectCategoryView StatusLast Update
0002377XdebugUncategorizedpublic2025-11-19 17:41
ReporterHypeMC Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
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

derick

2025-11-06 16:07

administrator   ~0007394

I can reproduce this, but there is nothing wrong on the Xdebug side. It had successfully sent all the variables to PhpStorm. For some reason, it might choke on what it received, but that's something to query the PhpStorm team about. I see no problems with VS Code either.

mpdude

2025-11-19 17:32

reporter   ~0007415

@HypeMC in case you opened or found a matching public issue in the PHPStorm bug tracker, could you please share a link here?

mpdude

2025-11-19 17:41

reporter   ~0007416

Update:

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
2025-11-06 16:07 derick Assigned To => derick
2025-11-06 16:07 derick Status new => resolved
2025-11-06 16:07 derick Resolution open => no change required
2025-11-06 16:07 derick Note Added: 0007394
2025-11-19 17:32 mpdude Note Added: 0007415
2025-11-19 17:41 mpdude Note Added: 0007416