rector
rector copied to clipboard
[DX] --xdebug should not be paralleled by default.
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
@staabm could you verify it? thank you.
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.
Phpstan has a separate --debug switch for enabling/disabling parallel (and an additional --xdebug switch to attach xdebug. They do work independently
Thanks @staabm , makes sense to keep these separated.
Closing then :+1:
The --debug now behaves the same way as PHPStan and disables the parallel: https://phpstan.org/user-guide/command-line-usage#--debug
Ref: https://github.com/rectorphp/rector-src/pull/5904