PhpStorm 2022.2.1 Preview
A preview build for PhpStorm 2022.2.1, the upcoming minor release of PhpStorm, is now available. It brings a fixed for a broken step over in debugger. Read on to see a detailed post-mortem of the issue.
Post-mortem for broken debugging in PhpStorm 2022.2
In PhpStorm 2022.2, we’ve implemented WI-56517 Display __toString() representation on an object in the debug Variables pane if the method is present.
As it turned out, in some cases, the debugger has a weird presentation of objects on
eval((string)<object>). It works fine in Xdebug 3.1+ since it has a special handler that mutes possible errors. However, in Xdebug 3.0 and below, some types of code break the debugger’s internal state and lead to an incorrect step over.
Below is a technical summary of the issue for those who are curious about what happened:
- Xdebug had a bug that basically breaks further ‘
step_over‘ commands by passing invalid eval commands. This bug was fixed in 3.1, but present in all previous versions.
- In 2022.2 We’ve implemented feature WI-56517 that shows
__toStringrepresentation of the object in the debug panel. This feature is implemented by passing the
eval((string)expression)command at the start of debug sessions.
- It turned out that there are a number of invalid inputs that happened to be produced by this command:
The combination of these factors resulted in a broken step over.
The WI-67891 Step Over broken for Xdebug 3.0.* for static methods and private properties from parent classes bug was reported to us during the EAP cycle, and we’re sorry for letting it slip through the net and into the stable release.
We apologize for the inconvenience this bug might have caused. This is why we are releasing a fix in this Preview build as soon as we could have, just 4 days after the release.
We have also introduced additional quality gates to make sure such regressions don’t make it into future releases.
In case you have any questions or suggestions, do not hesitate to contact us via the comments under this post, or just by tweeting at us @phpstorm.
Other notable changes and bug fixes in this build:
- Fixed: Garbled Japanese kanji characters in markdown(+mermaid) preview [IDEA-289431]
- Vite aliases in vite.config support [WEB-55332]
- Fixed: Terminal tab name resets when activating [IDEA-297207]
- Fixed: Terminal tab name is set as shell path/directory path by default and it’s too long [IDEA-290225]
- Fixed: Code style formating for php “Chained method calls” -> “Place ‘;’ on new line” does not work correctly when
assigning to variable [WI-65960]
- Fixed: Functions with type signatures including `this` keyword suggested to be static [WEB-47928]
- Fixed: Rector doesn’t work when vendor dir is located in a subfolder [WI-66976]
- Rector: Add ability to run rector on multiple selected in the project tree directories [WI-67178]
- Fixed: Method name completion does not work for first-class callables [WI-67267]
- Support new blade directives: @pushif, @vite, @vitereactrefresh [WI-67385]
- Fixed: Blade: Reformat code removes FQDNs from injections made by Laravel Idea [WI-67458]
The full list of changes in PhpStorm 2022.2.1 is available in the release notes. You can download this preview here:
That’s all for today. Thanks for keeping up with the changes!
Your JetBrains PhpStorm team
The Drive to Develop
Subscribe to Blog updates
Thanks, we've got you!
PhpStorm 2023.3 Is Now Available
Explore the new features in PhpStorm 2023.3: support for PHP 8.3, the Pest test framework, improvements for Symfony projects and AI Assistant.
PhpStorm Now Supports PHP 8.3
PhpStorm now provides full support for PHP 8.3 feature: the new `#[Override]` attribute and `json_validate()` function, and more!