1

I'm trying to run my Symfony website with XDebug, and PHP sockets at the same time.

To run the website:

bin/console server:start

To run the sockets

bin/console sockets:start

My sockets will not start unless XDebug is disabled. However, I would like XDebug to be enabled for my website.

A solution is to disable XDebug system-wide in php.ini, but I would like to know if it is possible to do so at runtime, so I could unload XDebug before starting sockets when I run sockets:start.

Thank you!

2 Answers 2

1

To fix, before PHP 7 people would suggest to comment out the extension from php.ini file. However, in PHP 7 they are no longer in there.

Instead, we use the phpdismod command.

$ sudo phpdismod -s cli xdebug

The -s flag tells it to disable Xdebug for the CLI SAPI (/etc/php/7.0/cli) and not FPM.

And just like that, the warning message should be gone. No need to restart PHP

1

just assign two different ports for the debugger in the xdebug.ini (the CLI has it's own) -

because it sounds alike, as if it would get stuck due not being able to bind the port.

... this additional port then needs to be set up in the IDE, too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.