Search code examples
symfonyphpstormxdebug

Debugging Symfony3 with built in server, Xdebug 2.5 and PhpStorm 2017 doesn't stop at breakpoint


I'm trying to debug my Symfony3 app with the built in server but it doesn't stop at breakpoint.

So I launch my app with bin/console server:run --env=dev and I can access it through the following URL: 127.0.0.1:8000.

Here is what I have done so far :

  1. PHP 5.6.31 installation from homebrew
  2. Xdebug installation and configuration : seems OK from my phpinfo()

    xdebug phpinfo

  3. PhpStorm setup of the PHP CLI Interpreter configuration the one I get when I do a php -v

  4. PhpStorm debug configuration: can accept external connection port 9000
  5. PhpStorm server config: host => 127.0.0.1 port 8000 (I tried with and without path mapping)
  6. PhpStorm setup of the PHP remote debug configuration : use of previous PHP server, ideKEY PHPSTORM
  7. Use of the "Xdebug Helper" Chrome addon
  8. Here is what my xdebug log shows

    xdebug log

What am I doing wrong?

I previously had and a php version 5.6.30 and I can see in the log that there is a xdebug:language_version="5.6.30" -- could there be a conflict from this previous installation?

I think I read all the post relate to this subject but I found only one that was actually talking of the built in server.


Solution

  • Thanks LazyOne! On Mac the port 9000 is used by php-fpm if installed (which was my case). So xdebug port has to be changed to another one like 9001 on both php.ini config and PHPSTORM Xdebug config. Don't forget like me to stop and restart listening de debug for the change to be activated :p