Skip to content
Advertisement

Can’t debug with Symfony CLI / Xdebug

I am running my server with symfony server:start command and I would like to debug it as usual with PHP remote debug provided by PhpStorm.

I’ve configured my Xdebug with these:

[XDebug]
xdebug.remote_enable = 1
xdebug.remote_host = localhost
xdebug.remote_port = 9001
xdebug.idekey = PHPSTORM
zend_extension=xdebug.so
xdebug.remote_autostart = 1

I have installed the debugtool for my browser and configured my server in the PHP remote debug window.

When I’m trying to debug my IDE is breaking in the router at /myuser/.symfony/php/3769648aac6303b385b2ccc41cfd442044060c7d-router.php:12 and saying it’s outside the project.

I also tried path mappings with no results.

If you need more Information please let me know.

Advertisement

Answer

I was running with PHP 7.4 CLI i tried to install the latest version of PHP-FPM and it’s now working with the same configuration as above.

I also disabled the option the Settings/Preferences | Languages & Frameworks | PHP | Debug | Xdebug | Force break at first line when a script is outside the project as @LazyOne said, thanks to him.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement