Add XDebug 3 support - #19
Conversation
| xdebug.remote_enable = 1 | ||
| xdebug.remote_autostart = 0 | ||
| xdebug.remote_connect_back = 0 |
There was a problem hiding this comment.
These are all now redundant since Lando provides these equivalent config vars by default via the XDEBUG_CONFIG environment var (client_host, discover_client_host, remote_enable and remote_enable).
| xdebug.remote_enable = 1 | ||
| xdebug.remote_autostart = 0 | ||
| xdebug.remote_connect_back = 0 | ||
| xdebug.remote_port=9000 |
There was a problem hiding this comment.
The default remote port for XDebug 3 is now 9003.
| xdebug.remote_connect_back = 0 | ||
| xdebug.remote_port=9000 | ||
| html_errors = 1 | ||
| xdebug.start_with_request = yes |
There was a problem hiding this comment.
With this being set to true, XDebug profiling is started with every request. The other option would be to enable profiling on trigger, but that requires either setting an environment variable (XDEBUG_TRIGGER), $_GET or $_POST variable, or via cookie (see the docs).
|
Tested this against Lando v3.0.25 and noticed some irregularities so I'm marking this as a draft for now until I find out what's wrong. |
With XDebug 3, Lando now configures XDebug through the
XDEBUG_MODEandXDEBUG_CONFIGenvironment vars. TheXDEBUG_MODEenvironment var configures thexdebug.modeXDebug config var, andXDEBUG_CONFIGconfigures any additional XDebug config vars one may want to modify.When
xdebug=truein Lando, by defaultxdebug.modewould be set todebug, andXDEBUG_CONFIGwould set some pre-defined config vars to enable remote debugging and logging.