Skip to content

Infinite-ish recursion on singleton classes #506

@Roy-Orbison

Description

@Roy-Orbison

Using XDebug + PHP, going through some code that contains a singleton class leads to Vdebug crashes. They can take a long time to recover, and then immediately crash again on the next step. I can prevent the crash by doing :VdebugEval! $not_a_var but this of course kills watching all context. VDebug expands the local variable containing the instance, finds its class' static property holding the same reference, and repeats.

I imagine the simplest way to avoid this is to check if any property (static or otherwise) is a reference to itself/one of its (visible) parents, and not expand it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions