Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite-ish recursion on singleton classes #506

Open
Roy-Orbison opened this issue Aug 9, 2021 · 1 comment
Open

Infinite-ish recursion on singleton classes #506

Roy-Orbison opened this issue Aug 9, 2021 · 1 comment

Comments

@Roy-Orbison
Copy link
Contributor

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.

@Roy-Orbison
Copy link
Contributor Author

It also occurs on closures that use a reference to themselves, for intentional recursion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant