You need xdebug.remote_enable=1
if you plan to contact a debug client. Which I would suspect a lot of people would/should. However, it's not required, its just one feature of xDebug. You can still get a lot of value from xDebug even if it's turned off (which it is by default).
Also by off by default is remote_autostart
. Setting xdebug.remote_autostart=1
will force xDebug to always attempt to connect to the remove client, regardless if the XDEBUG_SESSION
is properly set. I actually don't believe this should be recommended for all. Most users should leave this off and use the XDEBUG_SESSION
cookie instead. There are many browser plugins that can set this for you, and I should think that would be the recommended way. Remote debugging carries a large performance hit, and I've seen it cause issues in some edge cases. So I would think most people would only want that when they are actually stepping through code, and not every single time you make a request to the website. To each their own, but I felt it was important to point out just in case a reader was not familiar with what these settings do.
( Here are the all the setting if you want to read more: https://xdebug.org/docs/all_settings )