Search code examples
phpdebuggingphpstormsymfony

Symfony3 Debugging with PhpStorm


I have a symfony project and I am running it with the "bin/console server:run" command. I need to debug the project on Windows! I am using the PhpStorm IDE. I have downloaded the proper XDebug dll and setup the proper(I believe) settings in the php.ini file.

zend_extension = "C:\xampp\php\ext\php_xdebug-2.4.0-5.6-vc11.dll"
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.profiler_enable=1
xdebug.profiler_output_dir="C:\xampp\tmp"
xdebug.idekey=PHPSTORM

I have properly setup the php interpreter in the IDE and it detected the xdebug. I have followed this article. I have tried a lot of different PhpStorm configurations but without success. What's the proper way to debug a php project which is ran from the console with PhpStorm? Is it remote debugging and how can I setup it? Should I set some mappings or something else?


Solution

  • I have only needed to install xdebug, set the following configuration to the php.ini file:

    zend_extension = "C:\xampp\php\ext\php_xdebug-2.4.0-5.6-vc11.dll"
    xdebug.remote_enable=1
    xdebug.remote_autostart=1
    

    And configure the php interpreter in the IDE. After this configuration the debugging works out of the box in PhpStorm! It is only needed to click the "Start listening for debugging connections" icon. It is not needed to setup any debugging servers.