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

[DX] --xdebug should not be paralleled by default. #8542

Closed
oleg-andreyev opened this issue Mar 11, 2024 · 4 comments
Closed

[DX] --xdebug should not be paralleled by default. #8542

oleg-andreyev opened this issue Mar 11, 2024 · 4 comments
Labels

Comments

@oleg-andreyev
Copy link

oleg-andreyev commented Mar 11, 2024

Bug Report

Subject Details
Rector version 0.19.8

Today was trying to debug something in rector, looking at documentation I see to allow xdebug by adding --xdebug but because code is executed in parallel only main process is debugged.

Expected Behaviour

IMO if --xdebug is passed then rector should not be executed in parallel or need notify about it

@samsonasik
Copy link
Member

@staabm could you verify it? thank you.

@TomasVotruba
Copy link
Member

I agree with @oleg-andreyev. PHPStan behave the same behaves when debugging is used, it disables parallel.
The reason is that parallel adds more extra complexity, that nobody wants to deal with. And usually people debug when they already struggle :)

I'd be for applying same logic as PHPStan - if debug/xdebug is enabled, disable parallel and make debugging easier.

@staabm
Copy link
Contributor

staabm commented Mar 12, 2024

Phpstan has a separate --debug switch for enabling/disabling parallel (and an additional --xdebug switch to attach xdebug. They do work independently

@TomasVotruba
Copy link
Member

Thanks @staabm , makes sense to keep these separated.

Closing then 👍


The --debug now behaves the same way as PHPStan and disables the parallel: https://phpstan.org/user-guide/command-line-usage#--debug

Ref: rectorphp/rector-src#5904

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

No branches or pull requests

4 participants