We just need to tell PhpStorm where to find the Xdebug extension in the Debugger extension field – that’s the location you should have taken note of earlier when you were looking at the config files. You’ll see a list of your configured interpreters in a drop down, pick the relevant PHP install and then press the … button to see it’s settings: To do this, navigate to Languages and Frameworks and then PHP in the preference pane. Next, we need to tell PhpStorm where to find Xdebug when we need it. Now we don’t have Xdebug installed, and our command line scripts (including Composer and our unit tests) will run much faster. What you are looking for is when you run `php -v` from the command line, you don’t get the “with Xdebug by Derick Rethans” line: While you’re working with the configuration that enables Xdebug in your actual PHP install, it’s worth taking a note of where the Xdebug extension lives on your system as you’ll need that later. Usually, this is a case of either renaming a config file, or commenting out the lines that load the extension. To use the great new feature, first, you need to disable Xdebug for command line PHP scripts. PhpStorm 2016.2 introduces Xdebug On Demand mode where you can disable Xdebug for your global PHP install, and PhpStorm will only enable it when it needs to - when you’re debugging your scripts, or when you need code coverage reports. Turning Xdebug on and off depending on the situation can be a painful chore… Until now. Jordi added this warning because Xdebug does wondrous things when you are developing, but it slows down execution of PHP scripts massively. You may have noticed recent versions of the Composer dependency manager has come with a warning if you have Xdebug enabled:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |