In order to debug symfony or php apps that uses front end controller approach, you need to have several things:
- Configure Xdebug. I prefer to use the
On-Demand mode
, but beware that it's only applicable to cli scripts / code coverage reports. Make sure that you set thexdebug.mode=debug
andxdebug.idekey=PHPSTORM
. This will be usefull in case you need to Debugging Symfony commands.
- To debug incoming http request, you need to have a webserver running configuration. We'll use the
PHP Built-in Web Server
as it's sufficient for our purpose. Click Run > Edit Configurations > Add New Configuration > PHP Built-in We